1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-25 07:46:15 +02:00

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>
This commit is contained in:
Johannes Schindelin 2007-02-02 00:07:24 +01:00 committed by Junio C Hamano
parent 11cf8801d7
commit d271fd5311

View File

@ -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);