aboutsummaryrefslogtreecommitdiff
path: root/git-fetch.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-02-20 03:01:44 +0100
committerJunio C Hamano <junkio@cox.net>2007-02-19 19:20:05 -0800
commit83a5ad61268bbfea7e0d3180528366690f951554 (patch)
tree0cf3088f4bd830efb7b0b70fce31174f4a13a4c0 /git-fetch.sh
parent437b1b20df4b356c9342dac8d38849f24ef44f27 (diff)
downloadgit-83a5ad61268bbfea7e0d3180528366690f951554.tar.gz
git-83a5ad61268bbfea7e0d3180528366690f951554.tar.xz
fetch & clone: do not output progress when not on a tty
This adds the option "--no-progress" to fetch-pack and upload-pack, and makes fetch and clone pass this option when stdout is not a tty. While at documenting that option, also document --strict and --timeout options for upload-pack. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index ca984e739..851ed6b64 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
@@ -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"
) |
(