Jacob Keller <jacob.kel...@gmail.com> writes:

> I've been looking at the refspecs for git fetch, and noticed that
> globs are partially supported. I wanted to use something like:
>
> refs/tags/some-prefix-*:refs/tags/some-prefix-*
>
> as a refspec, so that I can fetch only tags which have a specific
> prefix. I know that I could use namespaces to separate tags, but
> unfortunately, I am unable to fix the tag format. The specific
> repository in question is also generating several tags which are not
> relevant to me, in formats that are not really useful for human
> consumption. I am also not able to fix this less than useful practice.
>
> However, I noticed that refspecs only support * as a single component.
> The match algorithm works perfectly fine, as documented in
> abd2bde78bd9 ("Support '*' in the middle of a refspec")
>
> What is the reason for not allowing slightly more arbitrary
> expressions? Obviously no more than one *...

I cannot seem to be able to find related discussions around that
patch, so this is only my guess, but I suspect that this is to
discourage people from doing something like:

        refs/tags/*:refs/tags/foo-*

which would open can of worms (e.g. imagine you fetch with that
pathspec and then push with refs/tags/*:refs/tags/* back there;
would you now get foo-v1.0.0 and foo-foo-v1.0.0 for their v1.0.0
tag?) we'd prefer not having to worry about.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to