diff options
author | Junio C Hamano <junkio@cox.net> | 2007-01-19 01:19:05 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-19 17:57:53 -0800 |
commit | 16d7cc90dd6e68a170362ae6f0fbfbc504fd246b (patch) | |
tree | 6675317cbe5a1d8017d1c7856fd3ac430debd247 /refs.h | |
parent | e86eb6668ee0c574ba0b6c2c94564d4159a6fcc7 (diff) | |
download | git-16d7cc90dd6e68a170362ae6f0fbfbc504fd246b.tar.gz |
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 <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 *); |