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

RE: [BUG] `git describe` doesn't traverse the graph in topological order

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Sep 22, 2023, 19:27 UTC
Message-ID
<033c01d9ed8a$c6916f30$53b44d90$@nexbridge.com>
In-Reply-To
<ZQ3leoLhljc+P5wP@farprobe>
On Friday, September 22, 2023 3:06 PM, Ben Boeckel wrote:
Show 16 quoted lines
>On Fri, Sep 22, 2023 at 14:49:58 -0400, rsbecker@nexbridge.com wrote:
>> On Friday, September 22, 2023 2:44 PM, Ben Boeckel wrote:
>> >Yes. It is explained that the commit date stored is only to 1 second
>> >granularity. Since the commits are stored in commit-date, an equal
>> >commit date ends up "twisting" the history and traversing some ancestors of
>commits before the commits themsevles.
>> >This loses the "seen" bit tracking that is done and ends up labeling
>> >way more commits as "not part of" ancestors. By sleeping for a
>> >second, the commit dates can be totally ordered reliably.
>>
>> This is going to be awkward to resolve as time_t only resolves
>> (portably) to 1 second intervals. I still would prefer the resolution
>> to be path-based rather than time-based.
>
>I certainly agree, but I'm not sure of the best way of doing that. Do we create/load a
>commit graph and use that for resolving insertion order into the commit heap?
I actually thought it worked that way. This may end up in a bigger change than fixing the issue because --first-parent does not appear to be sufficient to resolve the correct tag from your graph. My thought on using multiple commitish values to do that may help, but implementing that could lead to an O(n*m) scan (n=max commit tree width, m=depth to tag), plus a commitish hash lookup.
Previous: 'Ben Boeckel'Next: 'Ben Boeckel'
Message 12 of 20 in “[BUG] `git describe` doesn't traverse the graph in topological order”
  1. Ben BoeckelAug 12, 2023
  2. Ben BoeckelSep 22, 2023
  3. rsbecker@nexbridge.comSep 22, 2023
  4. 'Ben Boeckel'Sep 22, 2023
  5. rsbecker@nexbridge.comSep 22, 2023
  6. 'Ben Boeckel'Sep 22, 2023
  7. Junio C HamanoSep 22, 2023
  8. rsbecker@nexbridge.comSep 22, 2023
  9. 'Ben Boeckel'Sep 22, 2023
  10. rsbecker@nexbridge.comSep 22, 2023
  11. 'Ben Boeckel'Sep 22, 2023
  12. rsbecker@nexbridge.comSep 22, 2023
  13. 'Ben Boeckel'Nov 20, 2025
  14. Jeff KingNov 20, 2025
  15. 'Ben Boeckel'Feb 28, 2026
  16. 'Ben Boeckel'Sep 22, 2023
  17. 'Ben Boeckel'Sep 23, 2023
  18. Kristoffer HaugsbakkSep 22, 2023
  19. Kristoffer HaugsbakkSep 22, 2023
  20. 'Ben Boeckel'Sep 22, 2023

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.