diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-01-21 16:16:27 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-01-21 16:16:27 -0800 |
| commit | 070fa416755497ce78e09713ef5cd37e2c7205f2 (patch) | |
| tree | 9501aa627d5239ab3bd11c38a042aa7c354ffd26 /builtin | |
| parent | 83a69f19359e6d9bc980563caca38b2b5729808c (diff) | |
| parent | dcc9c7ef47d8755f1448116cdf0a421129999cd4 (diff) | |
| download | git-070fa416755497ce78e09713ef5cd37e2c7205f2.tar.xz | |
Merge branch 'ps/geometric-repacking-with-promisor-remotes'
"git repack --geometric" did not work with promisor packs, which
has been corrected.
* ps/geometric-repacking-with-promisor-remotes:
builtin/repack: handle promisor packs with geometric repacking
repack-promisor: extract function to remove redundant packs
repack-promisor: extract function to finalize repacking
repack-geometry: extract function to compute repacking split
builtin/pack-objects: exclude promisor objects with "--stdin-packs"
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/pack-objects.c | 14 | ||||
| -rw-r--r-- | builtin/repack.c | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 6ee31d48c9..5846b6a293 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -3863,8 +3863,11 @@ static void read_packs_list_from_stdin(struct rev_info *revs) repo_for_each_pack(the_repository, p) { const char *pack_name = pack_basename(p); - if ((item = string_list_lookup(&include_packs, pack_name))) + if ((item = string_list_lookup(&include_packs, pack_name))) { + if (exclude_promisor_objects && p->pack_promisor) + die(_("packfile %s is a promisor but --exclude-promisor-objects was given"), p->pack_name); item->util = p; + } if ((item = string_list_lookup(&exclude_packs, pack_name))) item->util = p; } @@ -3942,6 +3945,7 @@ static void read_stdin_packs(enum stdin_packs_mode mode, int rev_list_unpacked) revs.tree_objects = 1; revs.tag_objects = 1; revs.ignore_missing_links = 1; + revs.exclude_promisor_objects = exclude_promisor_objects; /* avoids adding objects in excluded packs */ ignore_packed_keep_in_core = 1; @@ -5098,9 +5102,13 @@ int cmd_pack_objects(int argc, exclude_promisor_objects_best_effort, "--exclude-promisor-objects-best-effort"); if (exclude_promisor_objects) { - use_internal_rev_list = 1; fetch_if_missing = 0; - strvec_push(&rp, "--exclude-promisor-objects"); + + /* --stdin-packs handles promisor objects separately. */ + if (!stdin_packs) { + use_internal_rev_list = 1; + strvec_push(&rp, "--exclude-promisor-objects"); + } } else if (exclude_promisor_objects_best_effort) { use_internal_rev_list = 1; fetch_if_missing = 0; diff --git a/builtin/repack.c b/builtin/repack.c index d9012141f6..f6bb04bef7 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -332,6 +332,9 @@ int cmd_repack(int argc, !(pack_everything & PACK_CRUFT)) strvec_push(&cmd.args, "--pack-loose-unreachable"); } else if (geometry.split_factor) { + pack_geometry_repack_promisors(repo, &po_args, &geometry, + &names, packtmp); + if (midx_must_contain_cruft) strvec_push(&cmd.args, "--stdin-packs"); else |
