Calvin Wan <calvinwan@xxxxxxxxxx> writes: > 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@xxxxxxxxxx> > --- > builtin/fetch.c | 1 + > t/t5506-remote-groups.sh | 9 +++++++++ > 2 files changed, 10 insertions(+) > > diff --git a/builtin/fetch.c b/builtin/fetch.c > index b06e454cbd..508ab2670c 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -2225,6 +2225,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) > argv++; > } > } > + string_list_remove_duplicates(&list, 0); As it always is possible to edit .git/config manually, it is necessary to perform deduplication like this patch does on the consumer side of the list, but do you know if our tool create duplication, or is it entirely something the end-user does manually? If it is the former, I am wondering if we should also fix such a code path that does so in the first place. Will queue. Thanks.