fetch --tags: fetch tags *in addition to* other stuff
commitc5a84e92a2fe9e8748e32341c344d7a6c0f52a50
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 30 Oct 2013 05:32:59 +0000 (30 06:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Oct 2013 21:16:36 +0000 (30 14:16 -0700)
treedc3431137e2495548a7c03e1e4b52c0c61ec9d17
parent0281c930f17042473e973f39810c8f7c93955d7d
fetch --tags: fetch tags *in addition to* other stuff

Previously, fetch's "--tags" option was considered equivalent to
specifying the refspec "refs/tags/*:refs/tags/*" on the command line;
in particular, it caused the remote.<name>.refspec configuration to be
ignored.

But it is not very useful to fetch tags without also fetching other
references, whereas it *is* quite useful to be able to fetch tags *in
addition to* other references.  So change the semantics of this option
to do the latter.

If a user wants to fetch *only* tags, then it is still possible to
specifying an explicit refspec:

    git fetch <remote> 'refs/tags/*:refs/tags/*'

Please note that the documentation prior to 1.8.0.3 was ambiguous
about this aspect of "fetch --tags" behavior.  Commit

    f0cb2f137c 2012-12-14 fetch --tags: clarify documentation

made the documentation match the old behavior.  This commit changes
the documentation to match the new behavior.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/fetch-options.txt
builtin/fetch.c
git-pull.sh
t/t5510-fetch.sh
t/t5515/fetch.br-unconfig_--tags_.._.git
t/t5515/fetch.master_--tags_.._.git
t/t5525-fetch-tagopt.sh