Fix 'git show' on signed tag of signed tag of commit
The cmd_show loop resolves tags by showing them, then pointing the object to the 'tagged' member. However, this object is not fully initialized; it only contains the SHA1. (This resulted in a segfault if there were two levels of tags.) We apply parse_object to get a full object. Noticed by Kalle Olavi Niemitalo on IRC. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Jul 1, 2008 at 11:47 UTC
4f3dcc2753ef6c244622334cef94a72682fcd850
1 file changed
+1
-1
builtin-log.c
+1
-1
@@ -360,7 +360,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
360
t->tag,
361
diff_get_color_opt(&rev.diffopt, DIFF_RESET));
362
ret = show_object(o->sha1, 1, &rev);
363
- objects[i].item = (struct object *)t->tagged;
363
+ objects[i].item = parse_object(t->tagged->sha1);
364
i--;
365
break;
366
}