]> git.ipfire.org Git - thirdparty/git.git/commit
fetch: fix duplicate remote parallel fetch bug
authorCalvin Wan <calvinwan@google.com>
Thu, 19 Jan 2023 22:05:38 +0000 (22:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Jan 2023 22:41:48 +0000 (14:41 -0800)
commit06a668cb90a6e8628f295adb6177855bb0a85a4a
tree1b6b60ad6d057083d2e7a759b7028c7250dbef6f
parent844ede312b4e988881b6e27e352f469d8ab80b2a
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>
builtin/fetch.c
t/t5506-remote-groups.sh