path: root/refs.h
diff options
authorNicolas Pitre <>2007-02-03 18:25:43 (GMT)
committerJunio C Hamano <>2007-02-03 19:57:18 (GMT)
commiteb8381c88518b10d683a29deea1d43ed671f14ec (patch)
treea9523ae68d874de91032c1ed3be92de168a2f73c /refs.h
parenta7e4fbf990290f955da1319ab605a59f85d3c3e2 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'refs.h')
1 files changed, 6 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 94a58b4..acedffc 100644
--- a/refs.h
+++ b/refs.h
@@ -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);