Subject: Re: [PATCH v3 11/11] fetch: add a --fetch-prune option and fetch.pruneTags config

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 24 Jan 2018 22:03:51 +0100

On Wed, Jan 24 2018, Junio C. Hamano jotted:

> Ævar Arnfjörð Bjarmason  <[email-masked]> writes:
>
>>  git -C {} config --replace-all remote.origin.fetch "+refs/tags/*:refs/tags/*" "^\+*refs/tags/\*:refs/tags/\*$"
>
> Shouldn't the last arg be
>
>  '^+\*refs/tags/\*:refs/tags/\*$'
>
> instead?

^+\* isn't a valid pattern.

This invocation is to replace both +refs/tags/[...] and refs/tags/[...]
with +refs/tags/[...]. This would be more specific, i.e. ^\+?

     git config --replace-all remote.origin.fetch "+refs/tags/*:refs/tags/*" "^\+?refs/tags/\*:refs/tags/\*$"

But I couldn't remeber offhand whether all regcomp() we use supports X?,
whereas they definitely do support X*.