summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ad0f27)
raw | patch | inline | side by side (parent: 7ad0f27)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 3 Jul 2008 02:32:45 +0000 (02:32 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 3 Jul 2008 04:21:59 +0000 (21:21 -0700) |
If we match a lightweight (non-annotated tag) as the name to
output and --long was requested we do not have a tag, nor do
we have a tagged object to display. Instead we must use the
object we were passed as input for the long format display.
Reported-by: Mark Burton <markb@ordern.com>
Backtraced-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
output and --long was requested we do not have a tag, nor do
we have a tagged object to display. Instead we must use the
object we were passed as input for the long format display.
Reported-by: Mark Burton <markb@ordern.com>
Backtraced-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-describe.c | patch | blob | history | |
t/t6120-describe.sh | patch | blob | history |
diff --git a/builtin-describe.c b/builtin-describe.c
index 3da99c1d06f1eeb85e760036dc881282558603d6..e515f9ca9b5d0ec13e96a7866e27bdd9e852b435 100644 (file)
--- a/builtin-describe.c
+++ b/builtin-describe.c
*/
display_name(n);
if (longformat)
- show_suffix(0, n->tag->tagged->sha1);
+ show_suffix(0, n->tag ? n->tag->tagged->sha1 : sha1);
printf("\n");
return;
}
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index c6be2597f73dbd49e6301d01b5ea3c86ac8c34cb..2fb672c3b43a9efe4cb9c85465f6b33f23724e48 100755 (executable)
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
check_describe "test2-lightweight-*" --tags --match="test2-*"
+check_describe "test2-lightweight-*" --long --tags --match="test2-*" HEAD^
+
test_done