Re: [PATCH v2 2/4] pack-objects: support reachability bitmaps with `--path-walk`
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 19, 2026, 14:36 UTC
- Message-ID
- <ec45260a-1d4e-49d1-9aa8-9ec94ecd9b23@gmail.com>
- In-Reply-To
- <ajVPJGXuhugDcT+A@nand.local>
On 6/19/2026 10:16 AM, Taylor Blau wrote:
Show 23 quoted lines
> On Fri, Jun 12, 2026 at 09:03:41AM -0400, Derrick Stolee wrote:
>> On 6/2/2026 6:21 PM, Taylor Blau wrote:
>>
>>> As a result, we can see significantly reduced pack sizes from p5311
>>> before this commit:
>>
>> I mentioned this before, but the pack _sizes_ aren't changing in this
>> example. We are computing them more quickly, though.
>
> Thanks for pointing this out. The paragraph following the perf output
> below correctly explains the results ("We get the same size of output
> pack, but [...]"), but this one is obviously wrong.
>
>> Since we are testing --path-walk on both sides, the change across this
>> commit is that we are using the bitmaps for the "counting objects" phase
>> and then potentially using the --path-walk algorithm to construct the
>> packfile.
>
> I'm not sure I agree here. Because we are using bitmaps, we're relying
> on pack-reuse to construct the output pack, not --path-walk. I mentioned
> in git-pack-objects(1), but the combination of seeing "--path-walk" and
> "--use-bitmap-index" together only means that we will use a path-walk
> traversal as fallback if we can't get an answer by relying on bitmaps.I guess my thought was that we'd construct bitmaps when they are available, but how do we walk objects to get the objects for commits that are not represented by bitmaps?
But you make a good point: we don't need to do that for functional use: the bitmap code does an object walk to produce a bitmap, and it's all in a layer "below" the pack-objects code.
So essentially, this _isn't_ a combined approach: it's "use bitmaps if we can, and fall back to --path-walk if we can't" which is changing from our previous behavior of "--path-walk means we don't try to use bitmaps".
Thanks, -Stolee