fetch & clone: do not output progress when not on a tty
[gitweb.git] / git-fetch.sh
index ca984e739a595131dca4070982f524d3a53f9637..851ed6b6466995ef36c02e88a3b1b161f4008471 100755 (executable)
@@ -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
@@ -377,7 +379,8 @@ fetch_main () {
     ( : subshell because we muck with IFS
       IFS="    $LF"
       (
-         git-fetch-pack --thin $exec $keep $shallow_depth "$remote" $rref ||
+         git-fetch-pack --thin $exec $keep $shallow_depth $no_progress \
+               "$remote" $rref ||
          echo failed "$remote"
       ) |
       (