Re: [PATCH v2 3/8] pack-bitmap: allow aborting iteration of bitmapped objects
- From
Jeff King <peff@peff.net>
- Date
- Jul 11, 2026, 08:01 UTC
- Message-ID
- <20260711080114.GA1470749@coredump.intra.peff.net>
- In-Reply-To
- <alFzja98avOoKjQE@com-79390>
On Fri, Jul 10, 2026 at 03:34:53PM -0700, Taylor Blau wrote:
Show 9 quoted lines
> 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).
-Peff