From c20711d29dff054735988c84ad5fe4f382d064cf Mon Sep 17 00:00:00 2001 From: Bryan Donlan Date: Fri, 28 Mar 2008 02:19:46 -0400 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-clone.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-clone.sh b/git-clone.sh index e981122778..2636159aaa 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 ;; -- 2.11.4.GIT