Re: [PATCH] fetch: fix duplicate remote parallel fetch bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux