gitweb: Check git base URLs before generating URL from it
[gitweb.git] / git-clone.sh
index 3998c55cef3658eda18817d513a5bd5003c30e89..24b119537bf5ed926235aabfceb8e4526af6f77a 100755 (executable)
@@ -312,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" || {
@@ -414,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"