git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: P Baker <me@retrodict.com>
To: git@vger.kernel.org
Subject: [PATCH 2/2] Make git submodule --quiet summary obey flag
Date: Wed, 8 Apr 2009 03:05:19 -0400	[thread overview]
Message-ID: <526944450904080005q115d17b4qcfc82239fc2e4b2d@mail.gmail.com> (raw)
In-Reply-To: <1239172707-38915-2-git-send-email-pbaker@retrodict.com>

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

           reply	other threads:[~2009-04-08  7:08 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1239172707-38915-2-git-send-email-pbaker@retrodict.com>]

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=526944450904080005q115d17b4qcfc82239fc2e4b2d@mail.gmail.com \
    --to=me@retrodict.com \
    --cc=git@vger.kernel.org \
    /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).