Re: [PATCH 7/7] builtin/merge-tree.c: implement support for `--write-pack`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 9, 2023, 17:24 UTC
- Message-ID
- <xmqqy1gb1zfd.fsf@gitster.g>
- In-Reply-To
- <20231008173329.GA1557002@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>> Yes, the bulk-checkin mechanism suffers from an even worse problem which >> is the pack it creates will contain no deltas whatsoever. The contents >> of the pack are just getting written as-is, so there's no fancy >> delta-ficiation going on. > > I wonder how big a deal this would be in practice for merges. > ...
Thanks for your experiments ;-)
The reason why bulk-checkin mechanism does not attempt deltifying (as opposed to fast-import that attempts to deltify with the immediately previous object and only with that single object) is exactly the same. It was done to support the initial check-in, which by definition lacks the delta opportunity along the time axis.
As you describe, such a delta-less pack would risk missed deltification opportunity when running a repack (without "-f"), as the opposite of the well known "reuse delta" heuristics, aka "this object was stored in the base form, it is likely that the previous pack-object tried but did not find a good delta base for it, let's not waste time retrying that" heuristics would get in the way.