summaryrefslogtreecommitdiff
path: root/object-file.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-04-14 08:02:08 +0200
committerJunio C Hamano <gitster@pobox.com>2023-04-14 10:27:52 -0700
commit932c16c04b5e41ee1c76d5640ec3ae67e1900c07 (patch)
treed56c922bdd27dd752066292b505d8b6087eecba2 /object-file.c
parent19a3a7bde9164c86353c944e939a1dcb537993f9 (diff)
repack: honor `-l` when calculating pack geometry
When the user passes `-l` to git-repack(1), then they essentially ask us to only repack objects part of the local object database while ignoring any packfiles part of an alternate object database. And we in fact honor this bit when doing a geometric repack as the resulting packfile will only ever contain local objects. What we're missing though is that we don't take locality of packfiles into account when computing whether the geometric sequence is intact or not. So even though we would only ever roll up local packfiles anyway, we could end up trying to repack because of non-local packfiles. This does not make much sense, and in the worst case it can cause us to try and do the geometric repack over and over again because we're never able to restore the geometric sequence. Fix this bug by honoring whether the user has passed `-l`. If so, we skip adding any non-local packfiles to the pack geometry. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
0 files changed, 0 insertions, 0 deletions