{"thread":{"id":"46509","subject":"[PATCH] clone: teach recursive clones to respect -q","startedAt":"2017-08-03T22:25:54Z","lastAt":"2017-08-04T17:05:21Z","messageCount":4,"participants":["Brandon Williams","Stefan Beller","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"325599","messageId":"20170803222544.17216-1-bmwill@google.com","threadId":"46509","inReplyTo":null,"subject":"[PATCH] clone: teach recursive clones to respect -q","fromName":"Brandon Williams","fromEmail":"bmwill@google.com","sentAt":"2017-08-03T22:25:44Z","receivedAt":"2017-08-03T22:25:54Z","isPatch":true,"sender":{"key":"bwilliams.eng@gmail.com","avatar":null},"body":"Teach 'git clone --recurse-submodules' to respect the '-q' option by\npassing down the quiet flag to the process which handles cloning of\nsubmodules.\n\nSigned-off-by: Brandon Williams <bmwill@google.com>\n---\n builtin/clone.c            | 3 +++\n t/t7400-submodule-basic.sh | 6 ++++++\n 2 files changed, 9 insertions(+)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 08b5cc433..f7e17d229 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -768,6 +768,9 @@ static int checkout(int submodule_progress)\n \t\tif (submodule_progress)\n \t\t\targv_array_push(&args, \"--progress\");\n \n+\t\tif (option_verbosity < 0)\n+\t\t\targv_array_push(&args, \"--quiet\");\n+\n \t\terr = run_command_v_opt(args.argv, RUN_GIT_CMD);\n \t\targv_array_clear(&args);\n \t}\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex dcac364c5..e9c3335b7 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' '\n \ttest_must_fail git -C multisuper_clone config --get submodule.sub1.active\n '\n \n+test_expect_success 'recursive clone respects -q' '\n+\ttest_when_finished \"rm -rf multisuper_clone\" &&\n+\tgit clone -q --recurse-submodules multisuper multisuper_clone >actual &&\n+\ttest_must_be_empty actual\n+'\n+\n test_done\n-- \n2.14.0.rc1.383.gd1ce394fe2-goog\n\n"},{"id":"325601","messageId":"CAGZ79kYc8FOhQmez2Hk0rtNhhWHMTMBOQkwhj-wwfuOmcVZZjw@mail.gmail.com","threadId":"46509","inReplyTo":"20170803222544.17216-1-bmwill@google.com","subject":"Re: [PATCH] clone: teach recursive clones to respect -q","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-08-03T22:32:02Z","receivedAt":"2017-08-03T22:32:11Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Aug 3, 2017 at 3:25 PM, Brandon Williams <bmwill@google.com> wrote:\n> Teach 'git clone --recurse-submodules' to respect the '-q' option by\n> passing down the quiet flag to the process which handles cloning of\n> submodules.\n>\n> Signed-off-by: Brandon Williams <bmwill@google.com>\n> ---\n\nYay! Thanks for this.\nLooks good to me.\n"},{"id":"325609","messageId":"xmqqvam3uxif.fsf@gitster.mtv.corp.google.com","threadId":"46509","inReplyTo":"20170803222544.17216-1-bmwill@google.com","subject":"Re: [PATCH] clone: teach recursive clones to respect -q","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-08-04T16:07:52Z","receivedAt":"2017-08-04T16:08:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Williams <bmwill@google.com> writes:\n\n> Teach 'git clone --recurse-submodules' to respect the '-q' option by\n> passing down the quiet flag to the process which handles cloning of\n> submodules.\n>\n> Signed-off-by: Brandon Williams <bmwill@google.com>\n> ---\n>  builtin/clone.c            | 3 +++\n>  t/t7400-submodule-basic.sh | 6 ++++++\n>  2 files changed, 9 insertions(+)\n>\n> diff --git a/builtin/clone.c b/builtin/clone.c\n> index 08b5cc433..f7e17d229 100644\n> --- a/builtin/clone.c\n> +++ b/builtin/clone.c\n> @@ -768,6 +768,9 @@ static int checkout(int submodule_progress)\n>  \t\tif (submodule_progress)\n>  \t\t\targv_array_push(&args, \"--progress\");\n>  \n> +\t\tif (option_verbosity < 0)\n> +\t\t\targv_array_push(&args, \"--quiet\");\n> +\n>  \t\terr = run_command_v_opt(args.argv, RUN_GIT_CMD);\n>  \t\targv_array_clear(&args);\n>  \t}\n\nGood spotting.  Makes me wonder if there still are other options we\nmight have missed, but we can incrementally improve as bug report\ncomes in ;-)\n\nWill queue.  Thanks.\n\n> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> index dcac364c5..e9c3335b7 100755\n> --- a/t/t7400-submodule-basic.sh\n> +++ b/t/t7400-submodule-basic.sh\n> @@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' '\n>  \ttest_must_fail git -C multisuper_clone config --get submodule.sub1.active\n>  '\n>  \n> +test_expect_success 'recursive clone respects -q' '\n> +\ttest_when_finished \"rm -rf multisuper_clone\" &&\n> +\tgit clone -q --recurse-submodules multisuper multisuper_clone >actual &&\n> +\ttest_must_be_empty actual\n> +'\n> +\n>  test_done\n"},{"id":"325614","messageId":"20170804170513.GA178896@google.com","threadId":"46509","inReplyTo":"xmqqvam3uxif.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] clone: teach recursive clones to respect -q","fromName":"Brandon Williams","fromEmail":"bmwill@google.com","sentAt":"2017-08-04T17:05:13Z","receivedAt":"2017-08-04T17:05:21Z","isPatch":true,"sender":{"key":"bwilliams.eng@gmail.com","avatar":null},"body":"On 08/04, Junio C Hamano wrote:\n> Brandon Williams <bmwill@google.com> writes:\n> \n> > Teach 'git clone --recurse-submodules' to respect the '-q' option by\n> > passing down the quiet flag to the process which handles cloning of\n> > submodules.\n> >\n> > Signed-off-by: Brandon Williams <bmwill@google.com>\n> > ---\n> >  builtin/clone.c            | 3 +++\n> >  t/t7400-submodule-basic.sh | 6 ++++++\n> >  2 files changed, 9 insertions(+)\n> >\n> > diff --git a/builtin/clone.c b/builtin/clone.c\n> > index 08b5cc433..f7e17d229 100644\n> > --- a/builtin/clone.c\n> > +++ b/builtin/clone.c\n> > @@ -768,6 +768,9 @@ static int checkout(int submodule_progress)\n> >  \t\tif (submodule_progress)\n> >  \t\t\targv_array_push(&args, \"--progress\");\n> >  \n> > +\t\tif (option_verbosity < 0)\n> > +\t\t\targv_array_push(&args, \"--quiet\");\n> > +\n> >  \t\terr = run_command_v_opt(args.argv, RUN_GIT_CMD);\n> >  \t\targv_array_clear(&args);\n> >  \t}\n> \n> Good spotting.  Makes me wonder if there still are other options we\n> might have missed, but we can incrementally improve as bug report\n> comes in ;-)\n\nYeah I've noticed that the number one difficulty with doing submodule\noperations in another process is making sure that the correct options\nare passed down.\n\n> \n> Will queue.  Thanks.\n\nThanks!\n\n> \n> > diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> > index dcac364c5..e9c3335b7 100755\n> > --- a/t/t7400-submodule-basic.sh\n> > +++ b/t/t7400-submodule-basic.sh\n> > @@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' '\n> >  \ttest_must_fail git -C multisuper_clone config --get submodule.sub1.active\n> >  '\n> >  \n> > +test_expect_success 'recursive clone respects -q' '\n> > +\ttest_when_finished \"rm -rf multisuper_clone\" &&\n> > +\tgit clone -q --recurse-submodules multisuper multisuper_clone >actual &&\n> > +\ttest_must_be_empty actual\n> > +'\n> > +\n> >  test_done\n\n-- \nBrandon Williams\n"}]}