Re: [PATCH] Clarify that '--tags' fetches tags only
- From
Michael Witten <mfwitten@gmail.com>
- Date
- Oct 1, 2011, 20:56 UTC
- Message-ID
- <CAMOZ1BsYYmH6hqcB4vfCq2LAu+fxJ4MzPQ1+-erUSqU1ptx2mQ@mail.gmail.com>
- In-Reply-To
- <loom.20111001T214551-834@post.gmane.org>
On Sat, Oct 1, 2011 at 20:22, Peter Shenkin <shenkin@gmail.com> wrote:
Show 5 quoted lines
> > The question is not how the --tags option should be > documented, but rather why "--tags" should behave > differently when the refspec is given on the commandline > than when the refspec is given in the .git/config file.
Again, see here:
[PATCH v3] Docs: Clarify the --tags option of `git fetch' Message-ID: <686c38876d5a4ad6bfac67ca77fe9bb3-mfwitten@gmail.com> http://article.gmane.org/gmane.comp.version-control.git/181887
namely:
This option is merely a shorthand for writing the refspec
`refs/tags/\*:refs/tags/\*'; that is, git fetch origin --tags
git fetch origin --tags frotzare equivalent to:
git fetch origin 'refs/tags/*:refs/tags/*'
git fetch origin frotz 'refs/tags/*:refs/tags/*'In other words, by writing "--tags", you are actually writing "refs/tags/\*:refs/tags/\*"; because you are stating an *explicit* refspec, "git fetch" doesn't bother with any *implicit* default in your config, which is consistent with how "git fetch" works.
It would probably be a good idea if there were a "--defaults", too.