Skip to content

Commit

Permalink
Teach the '@{...}' notation to git-log -g
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Feb 2, 2007
1 parent 11cf880 commit d271fd5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions reflog-walk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d271fd5

Please sign in to comment.