]> Kevux Git Server - rit/commit
pack-objects: refactor path-walk delta phase
authorDerrick Stolee <stolee@gmail.com>
Fri, 16 May 2025 18:12:00 +0000 (18:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 May 2025 19:15:40 +0000 (12:15 -0700)
commit206a1bb203613b6550f8acfdf300f822bfa3c985
tree6e6879b93c922778ebdec74a347aa1e7ef194973
parent4933152cbb55ef2c7064d47aaf135eb5fa6c35f9
pack-objects: refactor path-walk delta phase

Previously, the --path-walk option to 'git pack-objects' would compute
deltas inline with the path-walk logic. This would make the progress
indicator look like it is taking a long time to enumerate objects, and
then very quickly computed deltas.

Instead of computing deltas on each region of objects organized by tree,
store a list of regions corresponding to these groups. These can later
be pulled from the list for delta compression before doing the "global"
delta search.

This presents a new progress indicator that can be used in tests to
verify that this stage is happening.

The current implementation is not integrated with threads, but we are
setting it up to arrive in the next change.

Since we do not attempt to sort objects by size until after exploring
all trees, we can remove the previous change to t5530 due to a different
error message appearing first.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
pack-objects.h
t/t5300-pack-object.sh
t/t5530-upload-pack-error.sh