From: Johan Herland Date: Mon, 04 Jun 2007 00:53:26 GMT Subject: [PATCH 2/6] git-show: When showing tag objects with no tag name, show tag object's SHA1 instead of an empty string Message-ID: <200706040253.26845.johan@herland.net> In-Reply-To: <200706040251.52613.johan@herland.net> This is a consequence of making the "tag" header in tag objects optional. Signed-off-by: Johan Herland --- builtin-log.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin-log.c b/builtin-log.c index 3744712..1a0f111 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -181,7 +181,7 @@ int cmd_show(int argc, const char **argv, const char *prefix) printf("%stag %s%s\n\n", diff_get_color(rev.diffopt.color_diff, DIFF_COMMIT), - t->tag, + *(t->tag) ? t->tag : name, diff_get_color(rev.diffopt.color_diff, DIFF_RESET)); ret = show_object(o->sha1, 1); -- 1.5.2