@matheusbsbs / matheus-bagliano / commits / 24424fc2f7
Fork 0

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>

Junio C Hamano committed Feb 15, 2007 at 01:46 UTC 24424fc2f7cd7b3875fe6863587f47c043ac449d
1 file changed +9
git-fetch.sh
+9
@@ -243,6 +243,15 @@ then
243 orig_head=$(git-rev-parse --verify HEAD 2>/dev/null)
244 fi
245
246 +# Allow --notags from remote.$1.tagopt
247 +case "$tags$no_tags" in
248 +'')
249 + case "$(git-config --get "remote.$1.tagopt")" in
250 + --no-tags)
251 + no_tags=t ;;
252 + esac
253 +esac
254 +
255 # If --tags (and later --heads or --all) is specified, then we are
256 # not talking about defaults stored in Pull: line of remotes or
257 # branches file, and just fetch those and refspecs explicitly given.