Message ID | pull.720.v2.git.1599227449987.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | bcb68bff80eab46f9d5f367555da803e61d3d7c8 |
Headers | show |
Series | [v2] fetch: do not look for submodule changes in unchanged refs | expand |
diff --git a/builtin/fetch.c b/builtin/fetch.c index 0f23dd4b8c..d3f922fc89 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -958,8 +958,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 = "";