Hi Peff, On Fri, Feb 14, 2020 at 01:22:08PM -0500, Jeff King wrote: > When count_object_type() wants to iterate over the bitmap of all objects > of a certain type, we have to pair up OBJ_COMMIT with bitmap->commits, > and so forth. Since we're about to add more code to iterate over these > bitmaps, let's pull the initialization into its own function. > > We can also use this to simplify traverse_bitmap_commit_list(). It > accomplishes the same thing by manually passing the object type and the > bitmap to show_objects_for_type(), but using our helper we just need the > object type. > > Note there's one small code change here: previously we'd simply return > zero when counting an unknown object type, and now we'll BUG(). This > shouldn't matter in practice, as all of the callers pass in only usual > commit/tree/blob/tag types. This all makes sense, as does the refactoring below. On a relaid note: since you sent 'v2' before I had popped enough items off of my TODO list to look at your 'v1', I'll start my review in this thread instead of in v1. > Signed-off-by: Jeff King <peff@xxxxxxxx> Thanks, Taylor