diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-09-22 12:36:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-09-22 12:36:28 -0700 |
| commit | bcb68bff80eab46f9d5f367555da803e61d3d7c8 (patch) | |
| tree | 65f0ad5f0305922a7719313b9285fab4861fdc1c | |
| parent | 385c171a018f2747b329bcfa6be8eda1709e5abd (diff) | |
| parent | 7ea0c2f44dae65630e53bf36000933f8042eecda (diff) | |
| download | git-bcb68bff80eab46f9d5f367555da803e61d3d7c8.tar.gz | |
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 c555836937..76a4d14f57 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 = ""; |
