* [PATCH 2/2] Make git submodule --quiet summary obey flag
[not found] ` <1239172707-38915-2-git-send-email-pbaker@retrodict.com>
@ 2009-04-08 7:05 ` P Baker
0 siblings, 0 replies; only message in thread
From: P Baker @ 2009-04-08 7:05 UTC (permalink / raw)
To: git
Even with flag, summary would echo output. This patch conforms
git-submodule to match user expectations.
Signed-off-by: pbaker <pbaker@retrodict.com>
---
git-submodule.sh | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 7c2e060..784c6fa 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -187,7 +187,7 @@ cmd_add()
then
if test -d "$path"/.git -o -f "$path"/.git
then
- echo "Adding existing repo at '$path' to the index"
+ say "Adding existing repo at '$path' to the index"
else
die "'$path' already exists and is not a valid git repo"
fi
@@ -450,10 +450,10 @@ cmd_summary() {
while read mod_src mod_dst sha1_src sha1_dst status name
do
# Always show modules deleted or type-changed
(blob<->module)
- test $status = D -o $status = T && echo
"$name" && continue
+ test $status = D -o $status = T && say
"$name" && continue
# Also show added or modified modules which
are checked out
GIT_DIR="$name/.git" git-rev-parse --git-dir
>/dev/null 2>&1 &&
- echo "$name"
+ say "$name"
done
)
@@ -522,25 +522,25 @@ cmd_summary() {
total_commits=" ($(($total_commits + 0)))"
;;
esac
-
+
sha1_abbr_src=$(echo $sha1_src | cut -c1-7)
sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7)
if test $status = T
then
if test $mod_dst = 160000
then
- echo "* $name
$sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:"
+ say "* $name
$sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:"
else
- echo "* $name
$sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:"
+ say "* $name
$sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:"
fi
else
- echo "* $name
$sha1_abbr_src...$sha1_abbr_dst$total_commits:"
+ say "* $name
$sha1_abbr_src...$sha1_abbr_dst$total_commits:"
fi
if test -n "$errmsg"
then
# Don't give error msg for modification whose
dst is not submodule
# i.e. deleted or changed to blob
- test $mod_dst = 160000 && echo "$errmsg"
+ test $mod_dst = 160000 && echo >&2 "$errmsg"
else
if test $mod_src = 160000 -a $mod_dst = 160000
then
--
1.6.2.1.316.gedbc2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-08 7:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1239172707-38915-1-git-send-email-pbaker@retrodict.com>
[not found] ` <1239172707-38915-2-git-send-email-pbaker@retrodict.com>
2009-04-08 7:05 ` [PATCH 2/2] Make git submodule --quiet summary obey flag P Baker
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).