git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Orgad Shaneh <orgads@gmail.com>
To: git <git@vger.kernel.org>
Subject: [PATCH] submodule: add verbose mode for add/update
Date: Wed, 12 Mar 2014 08:38:51 +0200	[thread overview]
Message-ID: <CAGHpTBJ29oyuNojiAtsd73wau4Xsz2zuxxg04mFG0TdekeSRxA@mail.gmail.com> (raw)

Executes checkout without -q
---
 git-submodule.sh | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index a33f68d..5c4e057 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -5,11 +5,11 @@
 # Copyright (c) 2007 Lars Hjemli

 dashless=$(basename "$0" | sed -e 's/-/ /')
-USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>]
[--reference <repository>] [--] <repository> [<path>]
+USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>]
[--reference <repository>] [-v|--verbose] [--] <repository> [<path>]
    or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]
    or: $dashless [--quiet] init [--] [<path>...]
    or: $dashless [--quiet] deinit [-f|--force] [--] <path>...
-   or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch]
[-f|--force] [--rebase] [--reference <repository>] [--merge]
[--recursive] [--] [<path>...]
+   or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch]
[-f|--force] [--rebase] [--reference <repository>] [--merge]
[--recursive] [-v|--verbose] [--] [<path>...]
    or: $dashless [--quiet] summary [--cached|--files]
[--summary-limit <n>] [commit] [--] [<path>...]
    or: $dashless [--quiet] foreach [--recursive] <command>
    or: $dashless [--quiet] sync [--recursive] [--] [<path>...]"
@@ -319,12 +319,16 @@ module_clone()
  rel=$(echo $a | sed -e 's|[^/][^/]*|..|g')
  (
  clear_local_git_env
+ if test -z "$verbose"
+ then
+ subquiet=-q
+ fi
  cd "$sm_path" &&
  GIT_WORK_TREE=. git config core.worktree "$rel/$b" &&
  # ash fails to wordsplit ${local_branch:+-B "$local_branch"...}
  case "$local_branch" in
- '') git checkout -f -q ${start_point:+"$start_point"} ;;
- ?*) git checkout -f -q -B "$local_branch" ${start_point:+"$start_point"} ;;
+ '') git checkout -f $subquiet ${start_point:+"$start_point"} ;;
+ ?*) git checkout -f $subquiet -B "$local_branch"
${start_point:+"$start_point"} ;;
  esac
  ) || die "$(eval_gettext "Unable to setup cloned submodule '\$sm_path'")"
 }
@@ -380,6 +384,9 @@ cmd_add()
  --depth=*)
  depth=$1
  ;;
+ -v|--verbose)
+ verbose=1
+ ;;
  --)
  shift
  break
@@ -786,6 +793,9 @@ cmd_update()
  --depth=*)
  depth=$1
  ;;
+ -v|--verbose)
+ verbose=1
+ ;;
  --)
  shift
  break
@@ -913,7 +923,11 @@ Maybe you want to use 'update --init'?")"
  must_die_on_failure=
  case "$update_module" in
  checkout)
- command="git checkout $subforce -q"
+ if test -z "$verbose"
+ then
+ subquiet=-q
+ fi
+ command="git checkout $subforce $subquiet"
  die_msg="$(eval_gettext "Unable to checkout '\$sha1' in submodule
path '\$displaypath'")"
  say_msg="$(eval_gettext "Submodule path '\$displaypath': checked out
'\$sha1'")"
  ;;
-- 
1.9.0.msysgit.0

             reply	other threads:[~2014-03-12  6:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  6:38 Orgad Shaneh [this message]
2014-03-12  8:35 ` Eric Sunshine
  -- strict thread matches above, loose matches on Subject: below --
2014-03-12 20:03 Orgad Shaneh
2014-03-12 20:19 ` Junio C Hamano
2014-03-12 13:42 Orgad Shaneh
2014-03-12 16:15 ` Jens Lehmann
2014-03-12 20:00   ` Orgad Shaneh
2013-04-10 20:10 Orgad Shaneh
2013-04-10 18:24 Orgad Shaneh
2013-04-10 20:00 ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGHpTBJ29oyuNojiAtsd73wau4Xsz2zuxxg04mFG0TdekeSRxA@mail.gmail.com \
    --to=orgads@gmail.com \
    --cc=git@vger.kernel.org \
    --subject='Re: [PATCH] submodule: add verbose mode for add/update' \
    /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

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).