Merge branch 'os/fetch-submodule-optim'

Optimization around submodule handling.

* os/fetch-submodule-optim:
  fetch: do not look for submodule changes in unchanged refs
This commit is contained in:
Junio C Hamano 2020-09-22 12:36:28 -07:00
commit bcb68bff80

View File

@ -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 = "";