@matheusbsbs / matheus-bagliano / commits / d271fd5311
Fork 0

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>

Johannes Schindelin committed Feb 2, 2007 at 00:07 UTC d271fd5311da7e475b02ef11507155fa912f0553
1 file changed +8
reflog-walk.c
+8
@@ -165,6 +165,14 @@ void add_reflog_for_walk(struct reflog_walk_info *info,
165 if (item)
166 reflogs = item->util;
167 else {
168 + if (*branch == '\0') {
169 + unsigned char sha1[20];
170 + const char *head = resolve_ref("HEAD", sha1, 0, NULL);
171 + if (!head)
172 + die ("No current branch");
173 + free(branch);
174 + branch = xstrdup(head);
175 + }
176 reflogs = read_complete_reflog(branch);
177 if (!reflogs || reflogs->nr == 0)
178 die("No reflogs found for '%s'", branch);