summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorLibravatar Shawn Pearce <spearce@spearce.org>2006-05-17 05:56:09 -0400
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-17 17:36:36 -0700
commitd556fae2c0ea063f15ea4c3678fe931cc426f1ca (patch)
treee6913e22bdc72e0222328ea8ae2b6ac5201c8bcd /refs.h
parentLog ref updates to logs/refs/<ref> (diff)
downloadtgif-d556fae2c0ea063f15ea4c3678fe931cc426f1ca.tar.xz
Support 'master@2 hours ago' syntax
Extended sha1 expressions may now include date specifications which indicate a point in time within the local repository's history. If the ref indicated to the left of '@' has a log in $GIT_DIR/logs/<ref> then the value of the ref at the time indicated by the specification is obtained from the ref's log. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 43831e9be7..2c854de3fe 100644
--- a/refs.h
+++ b/refs.h
@@ -34,6 +34,9 @@ extern void unlock_ref (struct ref_lock *lock);
/** Writes sha1 into the ref specified by the 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, unsigned char *sha1);
+
/** Returns 0 if target has the right format for a ref. **/
extern int check_ref_format(const char *target);