summaryrefslogtreecommitdiff
path: root/git-clone.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-clone.sh
parent437b1b20df4b356c9342dac8d38849f24ef44f27 (diff)
downloadgit-83a5ad61268bbfea7e0d3180528366690f951554.tar.gz
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-clone.sh')
-rwxr-xr-xgit-clone.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 1bd54ded3c..86890ea1f4 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -79,6 +79,8 @@ origin=
origin_override=
use_separate_remote=t
depth=
+no_progress=
+test -t 1 || no_progress=--no-progress
while
case "$#,$1" in
0,*) break ;;
@@ -290,8 +292,8 @@ yes,yes)
;;
*)
case "$upload_pack" in
- '') git-fetch-pack --all -k $quiet $depth "$repo" ;;
- *) git-fetch-pack --all -k $quiet "$upload_pack" $depth "$repo" ;;
+ '') git-fetch-pack --all -k $quiet $depth $no_progress "$repo";;
+ *) git-fetch-pack --all -k $quiet "$upload_pack" $depth $no_progress "$repo" ;;
esac >"$GIT_DIR/CLONE_HEAD" ||
die "fetch-pack from '$repo' failed."
;;