summaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorBryan Donlan <bdonlan@fushizen.net>2008-03-28 06:19:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-03-31 05:21:06 (GMT)
commitc20711d29dff054735988c84ad5fe4f382d064cf (patch)
tree6e7fe99538c61390f56413858100dd4345c98971 /git-clone.sh
parent67dac28b904cf16e66c904eb61268b694809e4d5 (diff)
downloadgit-c20711d29dff054735988c84ad5fe4f382d064cf.zip
git-c20711d29dff054735988c84ad5fe4f382d064cf.tar.gz
git-c20711d29dff054735988c84ad5fe4f382d064cf.tar.bz2
Silence cpio's "N blocks" output when cloning locally
Pass --quiet to cpio in git-clone to hide the (confusing) "0 blocks" message. For compatibility with operating systems which might not support GNUisms, the presence of --quiet is probed for by grepping cpio's --help output. Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index e981122..2636159 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -310,6 +310,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 +333,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
;;