From: <rsbecker@nexbridge.com>
To: "'Ben Boeckel'" <ben.boeckel@kitware.com>
Cc: "'Junio C Hamano'" <gitster@pobox.com>, <git@vger.kernel.org>
Subject: RE: [BUG] `git describe` doesn't traverse the graph in topological order
Date: Fri, 22 Sep 2023 15:27:01 -0400 [thread overview]
Message-ID: <033c01d9ed8a$c6916f30$53b44d90$@nexbridge.com> (raw)
In-Reply-To: <ZQ3leoLhljc+P5wP@farprobe>
On Friday, September 22, 2023 3:06 PM, Ben Boeckel wrote:
>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.
next prev parent reply other threads:[~2023-09-22 19:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 19:36 [BUG] `git describe` doesn't traverse the graph in topological order Ben Boeckel
2023-09-22 15:39 ` Ben Boeckel
2023-09-22 16:13 ` rsbecker
2023-09-22 16:51 ` 'Ben Boeckel'
2023-09-22 17:14 ` rsbecker
2023-09-22 17:38 ` 'Ben Boeckel'
2023-09-22 17:51 ` Junio C Hamano
2023-09-22 18:12 ` rsbecker
2023-09-22 18:44 ` 'Ben Boeckel'
2023-09-22 18:49 ` rsbecker
2023-09-22 19:05 ` 'Ben Boeckel'
2023-09-22 19:27 ` rsbecker [this message]
2023-09-22 18:41 ` 'Ben Boeckel'
2023-09-23 12:32 ` 'Ben Boeckel'
2023-09-22 17:11 ` Kristoffer Haugsbakk
2023-09-22 17:35 ` Kristoffer Haugsbakk
2023-09-22 17:43 ` 'Ben Boeckel'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='033c01d9ed8a$c6916f30$53b44d90$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=ben.boeckel@kitware.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).