git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix describe --tags --long so it does not segfault

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 3, 2008, 04:23 UTC
Message-ID
<7vvdzn4mv3.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080703023245.GA31579@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 12 quoted lines
> 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>
> ---
>
>  Thanks Mikael, the backtrace really made it easy to figure out
>  what the breakage was here.

Thanks. I'll squash this in and apply to 'maint'. Perhaps 1.5.6.2 after the 4th holiday.

diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index c6be259..2fb672c 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -139,4 +139,6 @@ check_describe "test1-lightweight-*" --tags --match="test1-*"
 
 check_describe "test2-lightweight-*" --tags --match="test2-*"
 
+check_describe "test2-lightweight-*" --long --tags --match="test2-*" HEAD^
+
 test_done
Previous: Shawn O. PearceNext: Abhijit Menon-Sen
Message 4 of 5 in “git describe --tags --long barfs on new tags?”
  1. Mark BurtonJul 2, 2008
  2. Mikael MagnussonJul 2, 2008
  3. Fix describe --tags --long so it does not segfaultShawn O. Pearce, Jul 3, 2008
  4. Junio C HamanoJul 3, 2008
  5. Abhijit Menon-SenJul 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.