Honor "tagopt = --tags" configuration option

If the "tagopt = --tags" option of a remote is set, all tags
will be fetched as in "git fetch --tags".

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Samuel Tardieu
2010-04-20 01:31:25 +02:00
committed by Junio C Hamano
parent 5469e2dab1
commit 944163a4bd
3 changed files with 8 additions and 2 deletions

View File

@ -127,10 +127,12 @@ then
orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
fi
# Allow --notags from remote.$1.tagopt
# Allow --tags/--notags from remote.$1.tagopt
case "$tags$no_tags" in
'')
case "$(git config --get "remote.$1.tagopt")" in
--tags)
tags=t ;;
--no-tags)
no_tags=t ;;
esac