{"thread":{"id":"36133","subject":"[PATCH] submodule: add verbose mode for add/update","startedAt":"2014-03-12T06:38:51Z","lastAt":"2014-03-12T08:35:47Z","messageCount":2,"participants":["Orgad Shaneh","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"236561","messageId":"CAGHpTBJ29oyuNojiAtsd73wau4Xsz2zuxxg04mFG0TdekeSRxA@mail.gmail.com","threadId":"36133","inReplyTo":null,"subject":"[PATCH] submodule: add verbose mode for add/update","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2014-03-12T06:38:51Z","receivedAt":"2014-03-12T06:38:51Z","isPatch":true,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"Executes checkout without -q\n---\n git-submodule.sh | 24 +++++++++++++++++++-----\n 1 file changed, 19 insertions(+), 5 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex a33f68d..5c4e057 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -5,11 +5,11 @@\n # Copyright (c) 2007 Lars Hjemli\n\n dashless=$(basename \"$0\" | sed -e 's/-/ /')\n-USAGE=\"[--quiet] add [-b <branch>] [-f|--force] [--name <name>]\n[--reference <repository>] [--] <repository> [<path>]\n+USAGE=\"[--quiet] add [-b <branch>] [-f|--force] [--name <name>]\n[--reference <repository>] [-v|--verbose] [--] <repository> [<path>]\n    or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]\n    or: $dashless [--quiet] init [--] [<path>...]\n    or: $dashless [--quiet] deinit [-f|--force] [--] <path>...\n-   or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch]\n[-f|--force] [--rebase] [--reference <repository>] [--merge]\n[--recursive] [--] [<path>...]\n+   or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch]\n[-f|--force] [--rebase] [--reference <repository>] [--merge]\n[--recursive] [-v|--verbose] [--] [<path>...]\n    or: $dashless [--quiet] summary [--cached|--files]\n[--summary-limit <n>] [commit] [--] [<path>...]\n    or: $dashless [--quiet] foreach [--recursive] <command>\n    or: $dashless [--quiet] sync [--recursive] [--] [<path>...]\"\n@@ -319,12 +319,16 @@ module_clone()\n  rel=$(echo $a | sed -e 's|[^/][^/]*|..|g')\n  (\n  clear_local_git_env\n+ if test -z \"$verbose\"\n+ then\n+ subquiet=-q\n+ fi\n  cd \"$sm_path\" &&\n  GIT_WORK_TREE=. git config core.worktree \"$rel/$b\" &&\n  # ash fails to wordsplit ${local_branch:+-B \"$local_branch\"...}\n  case \"$local_branch\" in\n- '') git checkout -f -q ${start_point:+\"$start_point\"} ;;\n- ?*) git checkout -f -q -B \"$local_branch\" ${start_point:+\"$start_point\"} ;;\n+ '') git checkout -f $subquiet ${start_point:+\"$start_point\"} ;;\n+ ?*) git checkout -f $subquiet -B \"$local_branch\"\n${start_point:+\"$start_point\"} ;;\n  esac\n  ) || die \"$(eval_gettext \"Unable to setup cloned submodule '\\$sm_path'\")\"\n }\n@@ -380,6 +384,9 @@ cmd_add()\n  --depth=*)\n  depth=$1\n  ;;\n+ -v|--verbose)\n+ verbose=1\n+ ;;\n  --)\n  shift\n  break\n@@ -786,6 +793,9 @@ cmd_update()\n  --depth=*)\n  depth=$1\n  ;;\n+ -v|--verbose)\n+ verbose=1\n+ ;;\n  --)\n  shift\n  break\n@@ -913,7 +923,11 @@ Maybe you want to use 'update --init'?\")\"\n  must_die_on_failure=\n  case \"$update_module\" in\n  checkout)\n- command=\"git checkout $subforce -q\"\n+ if test -z \"$verbose\"\n+ then\n+ subquiet=-q\n+ fi\n+ command=\"git checkout $subforce $subquiet\"\n  die_msg=\"$(eval_gettext \"Unable to checkout '\\$sha1' in submodule\npath '\\$displaypath'\")\"\n  say_msg=\"$(eval_gettext \"Submodule path '\\$displaypath': checked out\n'\\$sha1'\")\"\n  ;;\n-- \n1.9.0.msysgit.0\n"},{"id":"236566","messageId":"5FD334C9-9AD9-40AE-ADFB-B96B8E2D8F66@sunshineco.com","threadId":"36133","inReplyTo":"CAGHpTBJ29oyuNojiAtsd73wau4Xsz2zuxxg04mFG0TdekeSRxA@mail.gmail.com","subject":"Re: [PATCH] submodule: add verbose mode for add/update","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2014-03-12T08:35:47Z","receivedAt":"2014-03-12T08:35:47Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mar 12, 2014, at 2:38 AM, Orgad Shaneh <orgads@gmail.com> wrote:\n> Executes checkout without -q\n> —\n\nMissing sign-off. See Documentation/SubmittingPatches.\n\nYour patch is badly whitespace-damaged, as if it was pasted into your email client. “git send-email” can avoid this problem.\n\nAs I’m not a submodule user, I won’t review the content of the patch other than to say that such a change should be accompanied by documentation update (Documentation/git-submodule.txt) and additional tests.\n\n> git-submodule.sh | 24 +++++++++++++++++++-----\n> 1 file changed, 19 insertions(+), 5 deletions(-)\n> \n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index a33f68d..5c4e057 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -5,11 +5,11 @@\n> # Copyright (c) 2007 Lars Hjemli\n> \n> dashless=$(basename \"$0\" | sed -e 's/-/ /')\n> -USAGE=\"[--quiet] add [-b <branch>] [-f|--force] [--name <name>]\n> [--reference <repository>] [--] <repository> [<path>]\n> +USAGE=\"[--quiet] add [-b <branch>] [-f|--force] [--name <name>]\n> [--reference <repository>] [-v|--verbose] [--] <repository> [<path>]\n> or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]\n> or: $dashless [--quiet] init [--] [<path>...]\n> or: $dashless [--quiet] deinit [-f|--force] [--] <path>...\n> -   or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch]\n> [-f|--force] [--rebase] [--reference <repository>] [--merge]\n> [--recursive] [--] [<path>...]\n> +   or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch]\n> [-f|--force] [--rebase] [--reference <repository>] [--merge]\n> [--recursive] [-v|--verbose] [--] [<path>...]\n> or: $dashless [--quiet] summary [--cached|--files]\n> [--summary-limit <n>] [commit] [--] [<path>...]\n> or: $dashless [--quiet] foreach [--recursive] <command>\n> or: $dashless [--quiet] sync [--recursive] [--] [<path>...]\"\n> @@ -319,12 +319,16 @@ module_clone()\n> rel=$(echo $a | sed -e 's|[^/][^/]*|..|g')\n> (\n> clear_local_git_env\n> + if test -z \"$verbose\"\n> + then\n> + subquiet=-q\n> + fi\n> cd \"$sm_path\" &&\n> GIT_WORK_TREE=. git config core.worktree \"$rel/$b\" &&\n> # ash fails to wordsplit ${local_branch:+-B \"$local_branch\"...}\n> case \"$local_branch\" in\n> - '') git checkout -f -q ${start_point:+\"$start_point\"} ;;\n> - ?*) git checkout -f -q -B \"$local_branch\" ${start_point:+\"$start_point\"} ;;\n> + '') git checkout -f $subquiet ${start_point:+\"$start_point\"} ;;\n> + ?*) git checkout -f $subquiet -B \"$local_branch\"\n> ${start_point:+\"$start_point\"} ;;\n> esac\n> ) || die \"$(eval_gettext \"Unable to setup cloned submodule '\\$sm_path'\")\"\n> }\n> @@ -380,6 +384,9 @@ cmd_add()\n> --depth=*)\n> depth=$1\n> ;;\n> + -v|--verbose)\n> + verbose=1\n> + ;;\n> --)\n> shift\n> break\n> @@ -786,6 +793,9 @@ cmd_update()\n> --depth=*)\n> depth=$1\n> ;;\n> + -v|--verbose)\n> + verbose=1\n> + ;;\n> --)\n> shift\n> break\n> @@ -913,7 +923,11 @@ Maybe you want to use 'update --init'?\")\"\n> must_die_on_failure=\n> case \"$update_module\" in\n> checkout)\n> - command=\"git checkout $subforce -q\"\n> + if test -z \"$verbose\"\n> + then\n> + subquiet=-q\n> + fi\n> + command=\"git checkout $subforce $subquiet\"\n> die_msg=\"$(eval_gettext \"Unable to checkout '\\$sha1' in submodule\n> path '\\$displaypath'\")\"\n> say_msg=\"$(eval_gettext \"Submodule path '\\$displaypath': checked out\n> '\\$sha1'\")\"\n> ;;\n> -- \n> 1.9.0.msysgit.0\n"}]}