summaryrefslogtreecommitdiff
path: root/reflog-walk.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-02-02 00:07:24 +0100
committerJunio C Hamano <junkio@cox.net>2007-02-01 21:50:16 -0800
commitd271fd5311da7e475b02ef11507155fa912f0553 (patch)
treed6a967358ae5bf4b6a8bfd04c8ad8af4f0fd859a /reflog-walk.c
parent11cf8801d7d58cc1532f11a827ce130c10d149be (diff)
downloadgit-d271fd5311da7e475b02ef11507155fa912f0553.tar.gz
Teach the '@{...}' notation to git-log -g
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'reflog-walk.c')
-rw-r--r--reflog-walk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/reflog-walk.c b/reflog-walk.c
index 82621601d6..653ec956f0 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -165,6 +165,14 @@ void add_reflog_for_walk(struct reflog_walk_info *info,
if (item)
reflogs = item->util;
else {
+ if (*branch == '\0') {
+ unsigned char sha1[20];
+ const char *head = resolve_ref("HEAD", sha1, 0, NULL);
+ if (!head)
+ die ("No current branch");
+ free(branch);
+ branch = xstrdup(head);
+ }
reflogs = read_complete_reflog(branch);
if (!reflogs || reflogs->nr == 0)
die("No reflogs found for '%s'", branch);