From: Derrick Stolee <stolee@gmail•com>
To: Jeff King <peff@peff•net>,
Kristofer Karlsson via GitGitGadget <gitgitgadget@gmail•com>
Cc: git@vger•kernel.org, Kristofer Karlsson <krka@spotify•com>
Subject: Re: [PATCH v3 0/2] commit-reach: use object flags for tips_reachable_from_bases()
Date: Thu, 21 May 2026 18:50:25 -0400 [thread overview]
Message-ID: <cdea34a8-6f20-4ebc-ac75-461e0f592104@gmail.com> (raw)
In-Reply-To: <20260519010354.GE1612961@coredump.intra.peff.net>
On 5/18/26 9:03 PM, Jeff King wrote:
> On Sat, May 16, 2026 at 03:59:39PM +0000, Kristofer Karlsson via GitGitGadget wrote:
>
>> v2 of this patch, addressing Jeff King's feedback:
>>
>> * Replaced the decoration hash with the RESULT object flag (simpler, no
>> extra data structure, handles duplicate tips naturally)
>> * Fixed early-termination bug when multiple refs point to the same commit
>> (the decoration API overwrites on duplicate keys)
>> * Removed the now-unused index field from struct commit_and_index
>> * Diff is +11/-12 lines
>
> Using the object flag here is so much nicer. I see you're reusing the
> RESULT flag. I'm not sure offhand if there might be any conflict with
> other uses of that flag bit. I think probably not, since it looks like
> it is cleared by the other users after they leave their respective
> functions?
>
> Using a direct set-inclusion check with the flag is nice, but we still
> look at min_generation_index. If I'm understanding the code right, this
> is mostly about counting the tips we've seen. Which at first glance
> means we could probably replace that code with some kind of counter. But
> I think maybe there is some notion of "crossing off" commits which we
> don't actually visit, but which we know become un-visitable because we
> traverse past their generation numbers.
>
> I think. This is really the first time I'm looking at this code. So
> AFAICT your patch as-is is correct, but it would be nice to go an ACK
> from Stolee.
Sorry for the delay, but I finally took a close look at this version
and I'm happy with the use of the RESULT bit. You clean it up and
shouldn't interfer with the 19th bit being used in upload-pack.c as
the HIDDEN_REF bit.
Thanks,
-Stolee
prev parent reply other threads:[~2026-05-21 22:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 18:07 [PATCH] commit-reach: use the decoration hash for tips_reachable_from_bases() Kristofer Karlsson via GitGitGadget
2026-05-15 21:14 ` Jeff King
2026-05-16 8:23 ` Kristofer Karlsson
2026-05-16 13:46 ` Derrick Stolee
2026-05-16 9:16 ` [PATCH v2] commit-reach: use object flags " Kristofer Karlsson via GitGitGadget
2026-05-16 15:59 ` [PATCH v3 0/2] " Kristofer Karlsson via GitGitGadget
2026-05-16 15:59 ` [PATCH v3 1/2] " Kristofer Karlsson via GitGitGadget
2026-05-16 15:59 ` [PATCH v3 2/2] t6600: add tests for duplicate tips in tips_reachable_from_bases() Kristofer Karlsson via GitGitGadget
2026-05-19 1:03 ` [PATCH v3 0/2] commit-reach: use object flags for tips_reachable_from_bases() Jeff King
2026-05-21 22:50 ` Derrick Stolee [this message]
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=cdea34a8-6f20-4ebc-ac75-461e0f592104@gmail.com \
--to=stolee@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitgitgadget@gmail$(echo .)com \
--cc=krka@spotify$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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