Skip to content

Commit bcb68bf

Browse files
committed
Merge branch 'os/fetch-submodule-optim'
Optimization around submodule handling. * os/fetch-submodule-optim: fetch: do not look for submodule changes in unchanged refs
2 parents 385c171 + 7ea0c2f commit bcb68bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builtin/fetch.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
966966
ref->force = rm->peer_ref->force;
967967
}
968968

969-
if (recurse_submodules != RECURSE_SUBMODULES_OFF)
969+
if (recurse_submodules != RECURSE_SUBMODULES_OFF &&
970+
(!rm->peer_ref || !oideq(&ref->old_oid, &ref->new_oid))) {
970971
check_for_new_submodule_commits(&rm->old_oid);
972+
}
971973

972974
if (!strcmp(rm->name, "HEAD")) {
973975
kind = "";

0 commit comments

Comments
 (0)