From: Orgad Shaneh <orgads@gmail.com>
To: git@vger.kernel.org
Cc: Orgad Shaneh <orgads@gmail.com>
Subject: [PATCH] git-submodule: respect -q for add/update
Date: Tue, 4 Sep 2012 10:31:20 +0300 [thread overview]
Message-ID: <1346743880-11379-1-git-send-email-orgads@gmail.com> (raw)
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
git-submodule.sh | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index aac575e..dd57abb 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -266,6 +266,11 @@ cmd_add()
repo=$1
sm_path=$2
+ quiet=
+ if test -n "$GIT_QUIET"
+ then
+ quiet=-q
+ fi
if test -z "$sm_path"; then
sm_path=$(echo "$repo" |
@@ -332,8 +337,8 @@ Use -f if you really want to add it." >&2
cd "$sm_path" &&
# ash fails to wordsplit ${branch:+-b "$branch"...}
case "$branch" in
- '') git checkout -f -q ;;
- ?*) git checkout -f -q -B "$branch" "origin/$branch" ;;
+ '') git checkout -f $quiet ;;
+ ?*) git checkout -f $quiet -B "$branch" "origin/$branch" ;;
esac
) || die "$(eval_gettext "Unable to checkout submodule '\$sm_path'")"
fi
@@ -527,6 +532,12 @@ cmd_update()
shift
done
+ quiet=
+ if test -n "$GIT_QUIET"
+ then
+ quiet=-q
+ fi
+
if test -n "$init"
then
cmd_init "--" "$@" || return
@@ -619,7 +630,7 @@ Maybe you want to use 'update --init'?")"
must_die_on_failure=yes
;;
*)
- command="git checkout $subforce -q"
+ command="git checkout $subforce $quiet"
die_msg="$(eval_gettext "Unable to checkout '\$sha1' in submodule path '\$sm_path'")"
say_msg="$(eval_gettext "Submodule path '\$sm_path': checked out '\$sha1'")"
;;
--
1.7.10.4
next reply other threads:[~2012-09-04 7:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 7:31 Orgad Shaneh [this message]
2012-09-04 15:28 ` [PATCH] git-submodule: respect -q for add/update Jens Lehmann
2012-09-05 11:42 ` Orgad and Raizel Shaneh
2012-09-05 20:33 ` Jens Lehmann
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=1346743880-11379-1-git-send-email-orgads@gmail.com \
--to=orgads@gmail.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).