Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Wan <calvinwan@google.com>2023-01-20 01:05:38 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-20 01:41:48 +0300
commit06a668cb90a6e8628f295adb6177855bb0a85a4a (patch)
tree1b6b60ad6d057083d2e7a759b7028c7250dbef6f /t/t5506-remote-groups.sh
parent844ede312b4e988881b6e27e352f469d8ab80b2a (diff)
fetch: fix duplicate remote parallel fetch bug
Fetching in parallel from a remote group with a duplicated remote results in the following: error: cannot lock ref '<ref>': is at <oid> but expected <oid> This doesn't happen in serial since fetching from the same remote that has already been fetched from is a noop. Therefore, remove any duplicated remotes after remote groups are parsed. Signed-off-by: Calvin Wan <calvinwan@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5506-remote-groups.sh')
-rwxr-xr-xt/t5506-remote-groups.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh
index 5bac03ede8..0e176175a3 100755
--- a/t/t5506-remote-groups.sh
+++ b/t/t5506-remote-groups.sh
@@ -99,4 +99,13 @@ test_expect_success 'updating remote name updates that remote' '
! repo_fetched two
'
+test_expect_success 'updating group in parallel with a duplicate remote does not fail (fetch)' '
+ mark fetch-group-duplicate &&
+ update_repo one &&
+ git config --add remotes.duplicate one &&
+ git config --add remotes.duplicate one &&
+ git -c fetch.parallel=2 remote update duplicate &&
+ repo_fetched one
+'
+
test_done