diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-09-29 03:55:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-29 06:20:56 +0200 |
commit | 6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13 (patch) | |
tree | 998a9f118f75eac980c677a0e41a16e2e0cd4a9d /pack-bitmap.h | |
parent | builtin/repack.c: support writing a MIDX while repacking (diff) | |
download | git-6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13.tar.xz git-6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13.zip |
builtin/repack.c: make largest pack preferred
When repacking into a geometric series and writing a multi-pack bitmap,
it is beneficial to have the largest resulting pack be the preferred
object source in the bitmap's MIDX, since selecting the large packs can
lead to fewer broken delta chains and better compression.
Teach 'git repack' to identify this pack and pass it to the MIDX write
machinery in order to mark it as preferred.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.h')
-rw-r--r-- | pack-bitmap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pack-bitmap.h b/pack-bitmap.h index 469090bad2..7d407c5a4c 100644 --- a/pack-bitmap.h +++ b/pack-bitmap.h @@ -55,6 +55,7 @@ int test_bitmap_commits(struct repository *r); struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs, struct list_objects_filter_options *filter, int filter_provided_objects); +uint32_t midx_preferred_pack(struct bitmap_index *bitmap_git); int reuse_partial_packfile_from_bitmap(struct bitmap_index *, struct packed_git **packfile, uint32_t *entries, |