diff options
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-x | git-fetch.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/git-fetch.sh b/git-fetch.sh index ca984e739a..5ae0d28cc0 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -24,6 +24,8 @@ update_head_ok= exec= keep= shallow_depth= +no_progress= +test -t 1 || no_progress=--no-progress while case "$#" in 0) break ;; esac do case "$1" in @@ -243,6 +245,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. @@ -377,8 +388,16 @@ fetch_main () { ( : subshell because we muck with IFS IFS=" $LF" ( - git-fetch-pack --thin $exec $keep $shallow_depth "$remote" $rref || + if test -f "$remote" ; then + test -n "$shallow_depth" && + die "shallow clone with bundle is not supported" + git-bundle unbundle "$remote" $rref || + echo failed "$remote" + else + git-fetch-pack --thin $exec $keep $shallow_depth $no_progress \ + "$remote" $rref || echo failed "$remote" + fi ) | ( trap ' |