remotes.not-origin.tagopt
PATCH 1/1 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-tagsyou 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-tagsSigned-off-by Junio C Hamano <[email protected]>
--- git-fetch.sh | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
git-fetch.sh +9 -0
@@ -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.
Hi,
Quoted 6 lines · Junio C Hamano
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
How about going the full nine yards, and call it "fetchopt"? Then we would not check for the tag options, but instead parse $fetchopt _after_ "$@" in git-fetch.
Ciao,
Dscho