diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-10-27 14:51:53 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-10-27 14:51:53 -0700 |
| commit | f62c546455cd5e9392b33147b72f0ffd66801636 (patch) | |
| tree | 028dfe1bce5934d58701df5531fd1f55494575f5 /builtin | |
| parent | Merge branch 'jk/unused-anno-more' (diff) | |
| parent | repack: don't remove .keep packs with `--pack-kept-objects` (diff) | |
| download | git-f62c546455cd5e9392b33147b72f0ffd66801636.tar.gz git-f62c546455cd5e9392b33147b72f0ffd66801636.zip | |
Merge branch 'tb/save-keep-pack-during-geometric-repack'
When geometric repacking feature is in use together with the
--pack-kept-objects option, we lost packs marked with .keep files.
* tb/save-keep-pack-during-geometric-repack:
repack: don't remove .keep packs with `--pack-kept-objects`
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/repack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/repack.c b/builtin/repack.c index a5bacc7797..f71909696d 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -1089,6 +1089,11 @@ int cmd_repack(int argc, const char **argv, const char *prefix) strbuf_addstr(&buf, pack_basename(p)); strbuf_strip_suffix(&buf, ".pack"); + if ((p->pack_keep) || + (string_list_has_string(&existing_kept_packs, + buf.buf))) + continue; + remove_redundant_pack(packdir, buf.buf); } strbuf_release(&buf); |
