From: Bryan Donlan <bdonlan@fushizen.net>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Bryan Donlan <bdonlan@fushizen.net>
Subject: [PATCH] Silence cpio's "N blocks" output when cloning locally
Date: Fri, 28 Mar 2008 02:19:46 -0400 [thread overview]
Message-ID: <1206685186-10352-1-git-send-email-bdonlan@fushizen.net> (raw)
In-Reply-To: <>
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>
---
git-clone.sh | 6 +++++-
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
;;
--
1.5.4.3
next reply other threads:[~2008-03-28 6:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 6:19 Bryan Donlan [this message]
2008-03-28 13:01 ` [PATCH] Silence cpio's "N blocks" output when cloning locally Johannes Schindelin
2008-03-28 16:12 ` Wincent Colaiuta
2008-03-28 16:29 ` Johannes Schindelin
2008-03-28 18:59 ` Bryan Donlan
2008-03-31 0:19 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1206685186-10352-1-git-send-email-bdonlan@fushizen.net \
--to=bdonlan@fushizen.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).