summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-18 17:58:04 -0700
committerJunio C Hamano <gitster@pobox.com>2020-09-18 17:58:04 -0700
commit2ce9d4e5c7186e15f2e2f7be06a9db52b5e61bde (patch)
treed714fe3830b74bfe18d194cfcbacdba1a1227f7e /submodule.c
parent45f462b5c5a55039c35fc7001f2256329220bf4f (diff)
parenta462bee5d5b52c9778a9df600494fbd87f3c5fb9 (diff)
downloadgit-2ce9d4e5c7186e15f2e2f7be06a9db52b5e61bde.tar.gz
Merge branch 'os/collect-changed-submodules-optim'
Optimization around submodule handling. * os/collect-changed-submodules-optim: submodule: suppress checking for file name and ref ambiguity for object ids
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 6f8002fc9e..b84438b7e0 100644
--- a/submodule.c
+++ b/submodule.c
@@ -840,9 +840,16 @@ static void collect_changed_submodules(struct repository *r,
{
struct rev_info rev;
const struct commit *commit;
+ int save_warning;
+ struct setup_revision_opt s_r_opt = {
+ .assume_dashdash = 1,
+ };
+ save_warning = warn_on_object_refname_ambiguity;
+ warn_on_object_refname_ambiguity = 0;
repo_init_revisions(r, &rev, NULL);
- setup_revisions(argv->nr, argv->v, &rev, NULL);
+ setup_revisions(argv->nr, argv->v, &rev, &s_r_opt);
+ warn_on_object_refname_ambiguity = save_warning;
if (prepare_revision_walk(&rev))
die(_("revision walk setup failed"));