Re: [PATCH 5/8] builtin/pack-objects: simplify logic to find kept or nonlocal objects
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 29, 2025, 23:15 UTC
- Message-ID
- <aQKf9vNkAkm6m216@nand.local>
- In-Reply-To
- <875xbxrc4q.fsf@iotcl.com>
On Wed, Oct 29, 2025 at 03:55:17PM +0100, Toon Claes wrote:
Show 16 quoted lines
> > + /* > > + * We have already checked `last_found`, so there is no need to > > + * re-check here. > > + */ > > I had to reason with myself why you need to extra `(void *)1` check, > maybe you can extend the comment a bit: > > /* > * When `last_found` was set to something else then > * `(void *)1` we have already checked it, > * so there is no need to re-check here. > */ > > > + if (p == last_found && last_found != (void *)1) > > + continue;
I wrote above to Patrick that I think the "&& last_found != (void *)1" part can be dropped, since repo_for_each_pack() should never hand us such a pointer to begin with.
Thanks, Taylor