Re: [PATCH v2 3/8] pack-bitmap: allow aborting iteration of bitmapped objects
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jul 13, 2026, 09:53 UTC
- Message-ID
- <alS1rus9thie7NiE@pks.im>
- In-Reply-To
- <20260711080114.GA1470749@coredump.intra.peff.net>
On Sat, Jul 11, 2026 at 04:01:14AM -0400, Jeff King wrote:
Show 18 quoted lines
> On Fri, Jul 10, 2026 at 03:34:53PM -0700, Taylor Blau wrote: > > > However, the remaining `show_objects_for_type()` callers from within > > `traverse_bitmap_commit_list()` do *not* bother to inspect the return > > value, despite taking in an arbitrary 'show_reachable_fn', which itself > > may return a non-zero value. > > > > I guess this must be effectively OK in practice with respect to the > > existing code for the same reason you indicate in the commit message > > above, but we should change this function to *also* propagate non-zero > > return values to eliminate the foot-gun completely. > > The matching non-bitmap traverse_commit_list() does not allow aborting > based on callback returns, either. In fact, its callbacks return void! > > Whichever direction we go, those two should probably stay in sync (so > either both should allow aborting early with a non-zero return, or both > should return void).
That's fair. But adapting `traverse_commit_list()` requires tons of changes all over the tree, so I'm inclined to rather leave both `traverse_bitmap_commit_list()` and `traverse_commit_list()` as-is. Does that work for both of you?
Patrick