On Wed, Jan 24 2018, Junio C. Hamano jotted: > Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 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*.