Re: [PATCH v3 11/11] fetch: add a --fetch-prune option and fetch.pruneTags config
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jan 24, 2018, 21:03 UTC
- Message-ID
- <878tcnklzc.fsf@evledraar.gmail.com>
- In-Reply-To
- <xmqqo9ljc73n.fsf@gitster.mtv.corp.google.com>
On Wed, Jan 24 2018, Junio C. Hamano jotted:
Show 9 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> 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*.