Thread (33 messages) flat view 33 messages, 6 authors, 2016-06-15
STALE3710d

[PATCH 2/6] git-show: When showing tag objects with no tag name, show tag object's SHA1 instead of an empty string

From: Johan Herland <hidden>
Date: 2016-06-15 22:43:14
Subsystem: the rest · Maintainer: Linus Torvalds

This is a consequence of making the "tag" header in tag objects optional.

Signed-off-by: Johan Herland <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help