summaryrefslogtreecommitdiff
path: root/git-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-15 01:46:27 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-15 01:52:14 -0800
commit24424fc2f7cd7b3875fe6863587f47c043ac449d (patch)
treec5b48642e2e399a7361e6314fcde371e6c95f828 /git-fetch.sh
parent437b1b20df4b356c9342dac8d38849f24ef44f27 (diff)
downloadgit-24424fc2f7cd7b3875fe6863587f47c043ac449d.tar.gz
remotes.not-origin.tagopt
With a configuration entry like this: [remote "alt-git"] url = git://repo.or.cz/alt.git/git/ fetch = +refs/heads/*:refs/remotes/alt-git/* tagopt = --no-tags you do not have to say "git pull --no-tags alt-git". Just saying "git pull alt-git" would suffice. Obviously, if you want to get the tag from such an alternate remote in a separate namespace, you could also do something like: [remote "alt-git"] url = git://repo.or.cz/alt.git/git/ fetch = +refs/heads/*:refs/remotes/alt-git/* fetch = +refs/tags/*:refs/remote-tags/alt-git/* tagopt = --no-tags Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index ca984e739a..d230995f6e 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -243,6 +243,15 @@ then
orig_head=$(git-rev-parse --verify HEAD 2>/dev/null)
fi
+# Allow --notags from remote.$1.tagopt
+case "$tags$no_tags" in
+'')
+ case "$(git-config --get "remote.$1.tagopt")" in
+ --no-tags)
+ no_tags=t ;;
+ esac
+esac
+
# If --tags (and later --heads or --all) is specified, then we are
# not talking about defaults stored in Pull: line of remotes or
# branches file, and just fetch those and refspecs explicitly given.