提交 4f3dcc27 编写于 作者: T Thomas Rast 提交者: Junio C Hamano

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: NThomas Rast <trast@student.ethz.ch>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 a0d2ceb2
......@@ -360,7 +360,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
t->tag,
diff_get_color_opt(&rev.diffopt, DIFF_RESET));
ret = show_object(o->sha1, 1, &rev);
objects[i].item = (struct object *)t->tagged;
objects[i].item = parse_object(t->tagged->sha1);
i--;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册