fetch: allow command line --tags to override config

Originally, if remote.<name>.tagopt was set, the --tags and option would
have no effect when given to git fetch. So if
tagopt="--no-tags"

	git fetch --tags

would not actually fetch tags.

This patch changes this behavior to only follow what is written in the
config if there is no option passed by the command line.

Signed-off-by: Daniel Johnson <ComputerDruid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Daniel Johnson
2010-08-11 18:57:20 -04:00
committed by Junio C Hamano
parent 64fdc08dac
commit ed36854651
4 changed files with 56 additions and 7 deletions

View File

@ -1623,7 +1623,9 @@ remote.<name>.tagopt::
Setting this value to \--no-tags disables automatic tag following when
fetching from remote <name>. Setting it to \--tags will fetch every
tag from remote <name>, even if they are not reachable from remote
branch heads.
branch heads. Passing these flags directly to linkgit:git-fetch[1] can
override this setting. See options \--tags and \--no-tags of
linkgit:git-fetch[1].
remote.<name>.vcs::
Setting this to a value <vcs> will cause git to interact with