Code

git-clone: honor --quiet
[git.git] / git-clone.sh
index acc7a51b97c2ade58ab64299eb16c940a724c260..24b119537bf5ed926235aabfceb8e4526af6f77a 100755 (executable)
@@ -31,6 +31,10 @@ clone_dumb_http () {
        cd "$2" &&
        clone_tmp="$GIT_DIR/clone-tmp" &&
        mkdir -p "$clone_tmp" || exit 1
+       if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
+               "`git-repo-config --bool http.noEPSV`" = true ]; then
+               curl_extra_args="${curl_extra_args} --disable-epsv"
+       fi
        http_fetch "$1/info/refs" "$clone_tmp/refs" || {
                echo >&2 "Cannot get remote repository information.
 Perhaps git-update-server-info needs to be run there?"
@@ -298,7 +302,7 @@ yes,yes)
                fi
                git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
                ;;
-       http://*)
+       https://*|http://*|ftp://*)
                if test -z "@@NO_CURL@@"
                then
                        clone_dumb_http "$repo" "$D"
@@ -308,7 +312,7 @@ yes,yes)
                fi
                ;;
        *)
-               cd "$D" && case "$upload_pack" in
+               case "$upload_pack" in
                '') git-fetch-pack --all -k $quiet "$repo" ;;
                *) git-fetch-pack --all -k $quiet "$upload_pack" "$repo" ;;
                esac >"$GIT_DIR/CLONE_HEAD" || {
@@ -410,7 +414,8 @@ Pull: refs/heads/$head_points_at:$origin_track" &&
 
        case "$no_checkout" in
        '')
-               git-read-tree -m -u -v HEAD HEAD
+               test "z$quiet" = z && v=-v || v=
+               git-read-tree -m -u $v HEAD HEAD
        esac
 fi
 rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"