Fix describe --tags --long so it does not segfault
commit14d4642e2a472ba4c06e10a3f5623d944b869314
authorShawn O. Pearce <spearce@spearce.org>
Thu, 3 Jul 2008 02:32:45 +0000 (3 02:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Jul 2008 04:21:59 +0000 (2 21:21 -0700)
treef19a9f78bc6a56bcc7bb64498277217103e171ba
parent7ad0f27b925463c5ca6908573ed24ede11a9981f
Fix describe --tags --long so it does not segfault

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>
builtin-describe.c
t/t6120-describe.sh