Re: [BUG] git fetch fetches tags matching negative refspec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> Because your refspec doesn't include refs/tags/*:, try e.g.:
>
> 	git fetch https://github.com/git/git.git 'refs/tags/*:refs/tags/*' --no-tags --dry-run
>
> That's what "--no-tags", i.e. it's per-se (and confusingly) nothing to
> do with whether you get tags or not, it's to do with whether we to tag
> following.

It indeed is confusing and might warrant some clarification, if not
updating.

 * "--tags" is equivalent to giving "refs/tags*:refs/tags*", so it
   might be natural to expect that you can say the same thing as
   above with "fetch $URL --tags --no-tags", but it does not work
   that way.  Command line parser treats "--tags" and "--no-tags" as
   if they follow the "last one wins" semantics.

 * As discussed in this thread, what "--no-tags" really means is "do
   not follow tags"; there is no way to countermand a "--no-tags"
   earlier on the command line to say "earlier we said do not
   follow, but we changed our mind.  Please do follow tags".

It would have been nice if we had from day one

 * "--tags": equivalent to writing "refs/tags/*:refs/tags/*"

 * "--no-tags": "earlier we said --tags, but we changed our
   mind. Please forget we earlier said --tags".

 * "--follow-tags": automatically fetch tags that point at an
   object that were fetched (default).

 * "--no-follow-tags": stop following tags.

but I do not think it is worth the churn and transition pain to
change it after more than 15 years.






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux