summaryrefslogtreecommitdiff
path: root/pack-bitmap.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-09-29 01:55:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-29 04:20:56 (GMT)
commit6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13 (patch)
tree998a9f118f75eac980c677a0e41a16e2e0cd4a9d /pack-bitmap.c
parent1d89d88d37d18cd3af37ef4742aa39282441ec14 (diff)
downloadgit-6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13.zip
git-6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13.tar.gz
git-6d08b9d4caa230441b7d9e2b4f23deaf9ff74c13.tar.bz2
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.c')
-rw-r--r--pack-bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 8504110..67be9be 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1418,7 +1418,7 @@ static int try_partial_reuse(struct packed_git *pack,
return 0;
}
-static uint32_t midx_preferred_pack(struct bitmap_index *bitmap_git)
+uint32_t midx_preferred_pack(struct bitmap_index *bitmap_git)
{
struct multi_pack_index *m = bitmap_git->midx;
if (!m)