From: Junio C Hamano Date: Sat, 11 Jul 2026 16:42:40 GMT Subject: Re: [PATCH v2 9/8?] pack-objects: drop unused return value from add_object_entry() Message-ID: In-Reply-To: <20260711075811.GC1457061@coredump.intra.peff.net> Jeff King writes: > On Fri, Jul 10, 2026 at 10:48:52AM +0200, Patrick Steinhardt wrote: > >> The series is built on top of f85a7e6620 (Start Git 2.56 cycle, >> 2026-07-06) with ps/odb-drop-whence at 8a7ad23e11 (odb: document object >> info fields, 2026-07-02) merged into it. > > Here's a patch doing the cleanup I proposed upthread. > > -- >8 -- > Subject: pack-objects: drop unused return value from add_object_entry() > > This function returns 0/1 to its caller to tell them whether we actually > added a new entry (or if we considered it redundant). But nobody has > relied on that behavior since 5379a5c5ee (Thin pack generation: > optimization., 2006-04-05). > > The extra return does not hurt much, but it recently became a bit more > confusing. We have a sister function, add_object_entry_from_bitmap(), > which had the same return value semantics. That function recently > changed to always return 0 (not void, because it must conform to a > callback function interface). So now we have two related functions which > both return an "int" but with different semantics. > > Let's drop the unused "int" return from add_object_entry() entirely, > which makes it more clear that the two functions have diverged. > > Signed-off-by: Jeff King > --- > I couldn't reference the commit by its id, since Junio has not yet > picked up the v2 sent a few hours ago. ;) Heh, if you do intend to make this a part of the series as 9/8, you can just say "earlier in the series" with its title, and that should be sufficient to identify which patch, as I never make a fast-forward merge when merging topics into integration branches (which means that Michael's "git when-merged" works well). And if we ever see v3 of this series, you and Patrick can work together to see if it makes sense to squash it in, or move it earlier in a series to as preliminary clean-up, etc. Thanks. I agree with the reasoning upthread that led to this change.