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