diff options
author | Taylor Blau <me@ttaylorr.com> | 2020-08-25 12:04:36 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-26 13:55:46 -0700 |
commit | e08f7bb09369d739ef03e1ac0180140a68e70982 (patch) | |
tree | 24094a6d231882be43920025413e4d15f3d11301 /Documentation/git-mergetool.txt | |
parent | Git 2.28 (diff) | |
download | tgif-e08f7bb09369d739ef03e1ac0180140a68e70982.tar.xz |
builtin/repack.c: invalidate MIDX only when necessary
In 525e18c04b (midx: clear midx on repack, 2018-07-12), 'git repack'
learned to remove a multi-pack-index file if it added or removed a pack
from the object store.
This mechanism is a little over-eager, since it is only necessary to
drop a MIDX if 'git repack' removes a pack that the MIDX references.
Adding a pack outside of the MIDX does not require invalidating the
MIDX, and likewise for removing a pack the MIDX does not know about.
Teach 'git repack' to check for this by loading the MIDX, and checking
whether the to-be-removed pack is known to the MIDX. This requires a
slightly odd alternation to a test in t5319, which is explained with a
comment. A new test is added to show that the MIDX is left alone when
both packs known to it are marked as .keep, but two packs unknown to it
are removed and combined into one new pack.
Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-mergetool.txt')
0 files changed, 0 insertions, 0 deletions