From: Junio C Hamano Date: Wed, 9 Feb 2022 22:20:59 +0000 (-0800) Subject: Merge branch 'gc/fetch-negotiate-only-early-return' X-Git-Tag: v2.36.0-rc0~177 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=commitdiff_plain;h=472a219f8daa522157886979ec954d4730755db1 Merge branch 'gc/fetch-negotiate-only-early-return' "git fetch --negotiate-only" is an internal command used by "git push" to figure out which part of our history is missing from the other side. It should never recurse into submodules even when fetch.recursesubmodules configuration variable is set, nor it should trigger "gc". The code has been tightened up to ensure it only does common ancestry discovery and nothing else. * gc/fetch-negotiate-only-early-return: fetch: help translators by reusing the same message template fetch --negotiate-only: do not update submodules fetch: skip tasks related to fetching objects fetch: use goto cleanup in cmd_fetch() --- 472a219f8daa522157886979ec954d4730755db1 diff --cc builtin/fetch.c index 5f06b21f8e,5c329f9835..5b3b18a72f --- a/builtin/fetch.c +++ b/builtin/fetch.c @@@ -2099,8 -2098,9 +2122,9 @@@ int cmd_fetch(int argc, const char **ar if (gtransport->smart_options) { gtransport->smart_options->acked_commits = &acked_commits; } else { - warning(_("Protocol does not support --negotiate-only, exiting.")); + warning(_("protocol does not support --negotiate-only, exiting")); - return 1; + result = 1; + goto cleanup; } if (server_options.nr) gtransport->server_options = &server_options;