summaryrefslogtreecommitdiff
path: root/builtin/rerere.c
diff options
context:
space:
mode:
authorLibravatar Glen Choo <chooglen@google.com>2022-01-18 16:00:56 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-18 16:22:58 -0800
commit386c076a863cfafd733b71564245be973e3d1bda (patch)
treeeedadc4a35b264d86507a62a0b02179beb369fa9 /builtin/rerere.c
parentfetch: skip tasks related to fetching objects (diff)
downloadtgif-386c076a863cfafd733b71564245be973e3d1bda.tar.xz
fetch --negotiate-only: do not update submodules
`git fetch --negotiate-only` is an implementation detail of push negotiation and, unlike most `git fetch` invocations, does not actually update the main repository. Thus it should not update submodules even if submodule recursion is enabled. This is not just slow, it is wrong e.g. push negotiation with "submodule.recurse=true" will cause submodules to be updated because it invokes `git fetch --negotiate-only`. Fix this by disabling submodule recursion if --negotiate-only was given. Since this makes --negotiate-only and --recurse-submodules incompatible, check for this invalid combination and die. This does not use the "goto cleanup" introduced in the previous commit because we want to recurse through submodules whenever a ref is fetched, and this can happen without introducing new objects. Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rerere.c')
0 files changed, 0 insertions, 0 deletions