X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-clone.sh;h=513b574d13858f1a81e6f66251890d81bf0e55ce;hb=957d6ea78fcbe71481a6f46a58768e100f7908e0;hp=1bd54ded3c424db30ca46b00b3ed42b4d774d21d;hpb=67c7575947b06a2a9bbdb355357895149bdbd8e5;p=git.git diff --git a/git-clone.sh b/git-clone.sh index 1bd54ded3..513b574d1 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -42,6 +42,7 @@ clone_dumb_http () { http_fetch "$1/info/refs" "$clone_tmp/refs" || die "Cannot get remote repository information. Perhaps git-update-server-info needs to be run there?" + test "z$quiet" = z && v=-v || v= while read sha1 refname do name=`expr "z$refname" : 'zrefs/\(.*\)'` && @@ -59,7 +60,7 @@ Perhaps git-update-server-info needs to be run there?" else tname=$name fi - git-http-fetch -v -a -w "$tname" "$name" "$1/" || exit 1 + git-http-fetch $v -a -w "$tname" "$name" "$1" || exit 1 done <"$clone_tmp/refs" rm -fr "$clone_tmp" http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" || @@ -79,6 +80,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 +293,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." ;; @@ -393,7 +396,7 @@ then case "$no_checkout" in '') - test "z$quiet" = z && v=-v || v= + test "z$quiet" = z -a "z$no_progress" = z && v=-v || v= git-read-tree -m -u $v HEAD HEAD esac fi