From: Johannes Schindelin Date: Thu, 1 Feb 2007 23:07:24 +0000 (+0100) Subject: Teach the '@{...}' notation to git-log -g X-Git-Tag: v1.5.0-rc4~84 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d271fd5311da7e475b02ef11507155fa912f0553;p=git.git Teach the '@{...}' notation to git-log -g Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/reflog-walk.c b/reflog-walk.c index 82621601d..653ec956f 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);