Re: [PATCH] Clarify that '--tags' fetches tags only
- From
Michael Witten <mfwitten@gmail.com>
- Date
- Sep 22, 2011, 02:01 UTC
- Message-ID
- <CAMOZ1Bvxc+vcofb_KyeLS7Gy=KOtX1SKv72cXA2NtwgYCWA31A@mail.gmail.com>
- In-Reply-To
- <7vwrd1z9it.fsf@alter.siamese.dyndns.org>
On Thu, Sep 22, 2011 at 00:49, Junio C Hamano <gitster@pobox.com> wrote:
> --tags is merely a short-hand for "refs/tags/*:refs/tags/*") > explicitly from the command line
[Disclaimer: I don't know the code or the semantics]
Why not just use that explanation?
This option is merely a short-hand for writing the refspec `refs/tags/*:refs/tags/*'; consequently, using this option overrides any default refspec that would be used if no refspec were provided on the command line. That is,
git fetch --tags origin frotz
is equivalent to:
git fetch origin frotz 'refs/tags/*:refs/tags/*'
In fact, if the command line parsing performed by `git fetch' is reasonably intelligent, then it might be worthwhile to relocate `--tags' in the example:
That is,
git fetch origin frotz --tags
is equivalent to:
git fetch origin frotz 'refs/tags/*:refs/tags/*'