summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-01-08 01:59:54 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-09 03:04:04 -0800
commit883d60fa97c6397450fb129634054e0a6101baac (patch)
tree5596e3bc152a71b2fc9ba3161217740bb4d77b6d /refs.h
parent1295228d1fdda17c2ef62e712649c962c3da5eb7 (diff)
downloadgit-883d60fa97c6397450fb129634054e0a6101baac.tar.gz
Sanitize for_each_reflog_ent()
It used to ignore the return value of the helper function; now, it expects it to return 0, and stops iteration upon non-zero return values; this value is then passed on as the return value of for_each_reflog_ent(). Further, it makes no sense to force the parsing upon the helper functions; for_each_reflog_ent() now calls the helper function with old and new sha1, the email, the timestamp & timezone, and the message. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.h b/refs.h
index de43cc768a..0e877e82ee 100644
--- a/refs.h
+++ b/refs.h
@@ -45,8 +45,8 @@ extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, cons
extern int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *sha1);
/* iterate over reflog entries */
-typedef int each_reflog_ent_fn(unsigned char *osha1, unsigned char *nsha1, char *, void *);
-void for_each_reflog_ent(const char *ref, each_reflog_ent_fn fn, void *cb_data);
+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);
/** Returns 0 if target has the right format for a ref. **/
extern int check_ref_format(const char *target);