diff options
author | Nicolas Pitre <nico@cam.org> | 2007-02-03 13:25:43 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-03 11:57:18 -0800 |
commit | eb8381c88518b10d683a29deea1d43ed671f14ec (patch) | |
tree | a9523ae68d874de91032c1ed3be92de168a2f73c /refs.h | |
parent | a7e4fbf990290f955da1319ab605a59f85d3c3e2 (diff) | |
download | git-eb8381c88518b10d683a29deea1d43ed671f14ec.tar.gz git-eb8381c88518b10d683a29deea1d43ed671f14ec.tar.xz |
scan reflogs independently from refs
Currently, the search for all reflogs depends on the existence of
corresponding refs under the .git/refs/ directory. Let's scan the
.git/logs/ directory directly instead.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -48,6 +48,12 @@ extern int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned typedef int each_reflog_ent_fn(unsigned char *osha1, unsigned char *nsha1, const char *, unsigned long, int, const char *, void *); int for_each_reflog_ent(const char *ref, each_reflog_ent_fn fn, void *cb_data); +/* + * Calls the specified function for each reflog file until it returns nonzero, + * and returns the value + */ +extern int for_each_reflog(each_ref_fn, void *); + /** Returns 0 if target has the right format for a ref. **/ extern int check_ref_format(const char *target); |