path: root/refs.h
diff options
authorJunio C Hamano <>2007-01-19 09:19:05 (GMT)
committerJunio C Hamano <>2007-01-20 01:57:53 (GMT)
commit16d7cc90dd6e68a170362ae6f0fbfbc504fd246b (patch)
tree6675317cbe5a1d8017d1c7856fd3ac430debd247 /refs.h
parente86eb6668ee0c574ba0b6c2c94564d4159a6fcc7 (diff)
Extend read_ref_at() to be usable from places other than sha1_name.
You can pass an extra argument to the function to receive the reflog message information. Also when the log does not go back beyond the point the user asked, the cut-off time and count are given back to the caller for emitting the error messages as appropriately. We could later add configuration for get_sha1_basic() to make it an error instead of it being just a warning. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'refs.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 0e877e8..33450f1 100644
--- a/refs.h
+++ b/refs.h
@@ -42,7 +42,7 @@ extern void unlock_ref(struct ref_lock *lock);
extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg);
/** Reads log for the value of ref during at_time. **/
-extern int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *sha1);
+extern int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *sha1, char **msg, unsigned long *cutoff_time, int *cutoff_tz, int *cutoff_cnt);
/* iterate over reflog entries */
typedef int each_reflog_ent_fn(unsigned char *osha1, unsigned char *nsha1, const char *, unsigned long, int, const char *, void *);