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

Re: git describe bug?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 11, 2010, 00:28 UTC
Message-ID
<20100411002825.GA23075@spearce.org>
In-Reply-To
<4BBB0377.8080007@op5.se>
Andreas Ericsson <ae@op5.se> wrote:
> Right now the behaviour is inconsistent.
...
> So as you can see, something else is going on. Both tags here are
> stashed as loose objects and both refs are unpacked.

Its the order the names were iterated out of the directory by readdir(). Or the order they were sorted by lexographical ordering during for_each_ref(). I can't remember if for_each_ref() sorts the items before processing.

But either describe uses the first item it found for a given commit if they have the same priority. There's no notion of date being factored into the decision of which tag to keep.

I'll work up a patch right now.
-- 
Shawn.
Previous: Andreas EricssonNext: Shawn O. Pearce
Message 4 of 17 in “git describe bug?”
  1. Dustin SallingsApr 2, 2010
  2. Shawn O. PearceApr 2, 2010
  3. Andreas EricssonApr 6, 2010
  4. Shawn O. PearceApr 11, 2010
  5. describe: Break annotated tag ties by tagger dateShawn O. Pearce, Apr 11, 2010
  6. Junio C HamanoApr 11, 2010
  7. Shawn O. PearceApr 11, 2010
  8. 1/5 tag.c: Correct indentationShawn O. Pearce, Apr 12, 2010
  9. 2/5 tag.h: Remove unused signature fieldShawn O. Pearce, Apr 12, 2010
  10. 3/5 tag.c: Refactor parse_tag_buffer to be saner to programShawn O. Pearce, Apr 12, 2010
  11. 4/5 tag.c: Parse tagger date (if present)Shawn O. Pearce, Apr 12, 2010
  12. 5/5 describe: Break annotated tag ties by tagger dateShawn O. Pearce, Apr 12, 2010
  13. Andreas EricssonApr 13, 2010
  14. Thomas RastApr 13, 2010
  15. Shawn O. PearceApr 13, 2010
  16. Junio C HamanoApr 13, 2010
  17. Shawn O. PearceApr 13, 2010

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.