From: Patrick Steinhardt Date: Thu, 07 Dec 2023 13:13:29 GMT Subject: Re: [PATCH 16/24] pack-objects: prepare `write_reused_pack()` for multi-pack reuse Message-ID: In-Reply-To: <67a8196978244b56d4f60861f140b78c59d15e30.1701198172.git.me@ttaylorr.com> On Tue, Nov 28, 2023 at 02:08:37PM -0500, Taylor Blau wrote: > The function `write_reused_pack()` within `builtin/pack-objects.c` is > responsible for performing pack-reuse on a single pack, and has two main > functions: > > - it dispatches a call to `write_reused_pack_verbatim()` to see if we > can reuse portions of the packfile in whole-word chunks > > - for any remaining objects (that is, any objects that appear after > the first "gap" in the bitmap), call write_reused_pack_one() on that > object to record it for reuse. > > Prepare this function for multi-pack reuse by removing the assumption > that the bit position corresponding to the first object being reused > from a given pack may not be at bit position zero. Is this double-negation intended? We remove the assumption that we start reading at position zero, but the paragraph here states that we remove the assumption that we do _not_ start at bit zero. I'll stop reviewing here and will come back to this series somewhen next week. Patrick