Code

change quoting in test t1006-cat-file.sh
[git.git] / git-clone.sh
index e98112277839349a47c26e69ce30982604d12d2c..8c7fc7f6317113fcef923dcc625fb94e13fb77a0 100755 (executable)
@@ -219,6 +219,7 @@ fi
 if test -n "$2"
 then
        dir="$2"
+       test $# = 2 || die "excess parameter to git-clone"
 else
        # Derive one from the repository name
        # Try using "humanish" part of source repo if user didn't specify one
@@ -310,6 +311,9 @@ yes)
                mkdir -p "$GIT_DIR/objects/info"
                echo "$repo/objects" >>"$GIT_DIR/objects/info/alternates"
        else
+               cpio_quiet_flag=""
+               cpio --help 2>&1 | grep -- --quiet >/dev/null && \
+                       cpio_quiet_flag=--quiet
                l= &&
                if test "$use_local_hardlink" = yes
                then
@@ -330,7 +334,8 @@ yes)
                        fi
                fi &&
                cd "$repo" &&
-               find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
+               find objects -depth -print | cpio $cpio_quiet_flag -pumd$l "$GIT_DIR/" || \
+                       exit 1
        fi
        git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
        ;;