diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-22 22:36:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-22 22:36:28 +0300 |
commit | bcb68bff80eab46f9d5f367555da803e61d3d7c8 (patch) | |
tree | 65f0ad5f0305922a7719313b9285fab4861fdc1c | |
parent | 385c171a018f2747b329bcfa6be8eda1709e5abd (diff) | |
parent | 7ea0c2f44dae65630e53bf36000933f8042eecda (diff) |
Merge branch 'os/fetch-submodule-optim'
Optimization around submodule handling.
* os/fetch-submodule-optim:
fetch: do not look for submodule changes in unchanged refs
-rw-r--r-- | builtin/fetch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index c5558369375..76a4d14f575 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -966,8 +966,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, ref->force = rm->peer_ref->force; } - if (recurse_submodules != RECURSE_SUBMODULES_OFF) + if (recurse_submodules != RECURSE_SUBMODULES_OFF && + (!rm->peer_ref || !oideq(&ref->old_oid, &ref->new_oid))) { check_for_new_submodule_commits(&rm->old_oid); + } if (!strcmp(rm->name, "HEAD")) { kind = ""; |