{"thread":{"id":"54329","subject":"[PATCH v2] Propagate --quiet on submodule update to merge/rebase","startedAt":"2020-09-30T19:51:25Z","lastAt":"2020-10-01T15:50:06Z","messageCount":5,"participants":["Theodore Dubois","Junio C Hamano","Eric Sunshine","Jonathan Nieder"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"406701","messageId":"20200930195052.118199-1-tbodt@google.com","threadId":"54329","inReplyTo":null,"subject":"[PATCH v2] Propagate --quiet on submodule update to merge/rebase","fromName":"Theodore Dubois","fromEmail":"tbodt@google.com","sentAt":"2020-09-30T19:50:53Z","receivedAt":"2020-09-30T19:51:25Z","isPatch":true,"sender":{"key":"tbodt@google.com","avatar":"https://avatars.githubusercontent.com/u/5678977?v=4"},"body":"Without this, commands such as\ngit pull --rebase --recurse-submodules --quiet\nmight produce non-quiet output from the merge or rebase.\n\nAlso fix the parsing of git submodule update -v. Setting GIT_QUIET to 0\nhas the same effect as setting GIT_QUIET to 1, because\n${GIT_QUIET:+--quiet} only checks whether GIT_QUIET is set or unset.\n\nSigned-off-by: Theodore Dubois <tbodt@google.com>\n---\n git-submodule.sh            |  6 +++---\n t/t7406-submodule-update.sh | 12 ++++++++++++\n 2 files changed, 15 insertions(+), 3 deletions(-)\n\ndiff --git git-submodule.sh git-submodule.sh\nindex 6fb12585cb..7ce52872b7 100755\n--- git-submodule.sh\n+++ git-submodule.sh\n@@ -440,7 +440,7 @@ cmd_update()\n \t\t\tGIT_QUIET=1\n \t\t\t;;\n \t\t-v)\n-\t\t\tGIT_QUIET=0\n+\t\t\tunset GIT_QUIET\n \t\t\t;;\n \t\t--progress)\n \t\t\tprogress=1\n@@ -614,13 +614,13 @@ cmd_update()\n \t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$displaypath': checked out '\\$sha1'\")\"\n \t\t\t\t;;\n \t\t\trebase)\n-\t\t\t\tcommand=\"git rebase\"\n+\t\t\t\tcommand=\"git rebase ${GIT_QUIET:+--quiet}\"\n \t\t\t\tdie_msg=\"$(eval_gettext \"Unable to rebase '\\$sha1' in submodule path '\\$displaypath'\")\"\n \t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$displaypath': rebased into '\\$sha1'\")\"\n \t\t\t\tmust_die_on_failure=yes\n \t\t\t\t;;\n \t\t\tmerge)\n-\t\t\t\tcommand=\"git merge\"\n+\t\t\t\tcommand=\"git merge ${GIT_QUIET:+--quiet}\"\n \t\t\t\tdie_msg=\"$(eval_gettext \"Unable to merge '\\$sha1' in submodule path '\\$displaypath'\")\"\n \t\t\t\tsay_msg=\"$(eval_gettext \"Submodule path '\\$displaypath': merged in '\\$sha1'\")\"\n \t\t\t\tmust_die_on_failure=yes\ndiff --git t/t7406-submodule-update.sh t/t7406-submodule-update.sh\nindex aa19ff3a2e..acb8766ac2 100755\n--- t/t7406-submodule-update.sh\n+++ t/t7406-submodule-update.sh\n@@ -1022,4 +1022,16 @@ test_expect_success 'git clone passes the parallel jobs config on to submodules'\n \trm -rf super4\n '\n \n+test_expect_success 'submodule update --quiet passes quietness to merge/rebase' '\n+\t(cd super &&\n+\t test_commit -C rebasing message &&\n+\t git submodule update --rebase --quiet >out 2>err &&\n+\t test_must_be_empty out &&\n+\t test_must_be_empty err &&\n+\t git submodule update --rebase -v >out 2>err &&\n+\t test_file_not_empty out &&\n+\t test_must_be_empty err\n+\t)\n+'\n+\n test_done\n-- \n2.28.0.709.gb0816b6eb0-goog\n\n"},{"id":"406709","messageId":"xmqqzh57f0dh.fsf@gitster.c.googlers.com","threadId":"54329","inReplyTo":"20200930195052.118199-1-tbodt@google.com","subject":"Re: [PATCH v2] Propagate --quiet on submodule update to merge/rebase","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-09-30T20:58:02Z","receivedAt":"2020-09-30T20:58:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Theodore Dubois <tbodt@google.com> writes:\n\n> Without this, commands such as\n> git pull --rebase --recurse-submodules --quiet\n> might produce non-quiet output from the merge or rebase.\n>\n> Also fix the parsing of git submodule update -v. Setting GIT_QUIET to 0\n> has the same effect as setting GIT_QUIET to 1, because\n> ${GIT_QUIET:+--quiet} only checks whether GIT_QUIET is set or unset.\n\nThanks.\n\nWill queue with the following log message.\n\n    submodule update: silence underlying merge/rebase \"--quiet\" is given\n    \n    Commands such as\n    \n        $ git pull --rebase --recurse-submodules --quiet\n    \n    produce non-quiet output from the merge or rebase.  Pass the --quiet\n    option down when invoking \"rebase\" and \"merge\".\n    \n    Also fix the parsing of git submodule update -v.\n    \n    When e84c3cf3 (git-submodule.sh: accept verbose flag in cmd_update\n    to be non-quiet, 2018-08-14) taught \"git submodule update\" to take\n    \"--quiet\", it apparently did not know how ${GIT_QUIET:+--quiet}\n    works, and reviewers seem to have missed that setting the variable\n    to \"0\" (instead of \"1\" which is used when \"--quiet\" is given) has\n    the same effect to pass \"--quiet\" to underlying commands.\n    \n    Signed-off-by: Theodore Dubois <tbodt@google.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\n"},{"id":"406710","messageId":"CAPig+cSoJf-=Po39qocKttH2TQNGW9wVov6cQgb5zbZjZz63Bw@mail.gmail.com","threadId":"54329","inReplyTo":"xmqqzh57f0dh.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2] Propagate --quiet on submodule update to merge/rebase","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-09-30T21:04:43Z","receivedAt":"2020-09-30T21:04:57Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Sep 30, 2020 at 4:58 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Will queue with the following log message.\n>\n>     submodule update: silence underlying merge/rebase \"--quiet\" is given\n\nProbably want to insert \"when\" in there.\n\n>     Commands such as\n>\n>         $ git pull --rebase --recurse-submodules --quiet\n>\n>     produce non-quiet output from the merge or rebase.  Pass the --quiet\n>     option down when invoking \"rebase\" and \"merge\".\n>\n>     Also fix the parsing of git submodule update -v.\n>\n>     When e84c3cf3 (git-submodule.sh: accept verbose flag in cmd_update\n>     to be non-quiet, 2018-08-14) taught \"git submodule update\" to take\n>     \"--quiet\", it apparently did not know how ${GIT_QUIET:+--quiet}\n>     works, and reviewers seem to have missed that setting the variable\n>     to \"0\" (instead of \"1\" which is used when \"--quiet\" is given) has\n>     the same effect to pass \"--quiet\" to underlying commands.\n\nPerhaps:\n\n    ... to \"0\", rather than unsetting it, still results in \"--quiet\"\n    being passed to underlying commands.\n"},{"id":"406752","messageId":"20201001053803.GC2930867@google.com","threadId":"54329","inReplyTo":"xmqqzh57f0dh.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2] Propagate --quiet on submodule update to merge/rebase","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-10-01T05:38:03Z","receivedAt":"2020-10-01T05:38:08Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n> Theodore Dubois <tbodt@google.com> writes:\n\n>> Without this, commands such as\n>> git pull --rebase --recurse-submodules --quiet\n>> might produce non-quiet output from the merge or rebase.\n>>\n>> Also fix the parsing of git submodule update -v. Setting GIT_QUIET to 0\n>> has the same effect as setting GIT_QUIET to 1, because\n>> ${GIT_QUIET:+--quiet} only checks whether GIT_QUIET is set or unset.\n>\n> Thanks.\n>\n> Will queue with the following log message.\n>\n>     submodule update: silence underlying merge/rebase \"--quiet\" is given\n\nMissing 'when' before '\"--quiet\"', as Eric noticed.\n\nAside from that,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks, all.\n"},{"id":"406765","messageId":"xmqqd022c5eg.fsf@gitster.c.googlers.com","threadId":"54329","inReplyTo":"20201001053803.GC2930867@google.com","subject":"Re: [PATCH v2] Propagate --quiet on submodule update to merge/rebase","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-01T15:49:59Z","receivedAt":"2020-10-01T15:50:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>> Theodore Dubois <tbodt@google.com> writes:\n>\n>>> Without this, commands such as\n>>> git pull --rebase --recurse-submodules --quiet\n>>> might produce non-quiet output from the merge or rebase.\n>>>\n>>> Also fix the parsing of git submodule update -v. Setting GIT_QUIET to 0\n>>> has the same effect as setting GIT_QUIET to 1, because\n>>> ${GIT_QUIET:+--quiet} only checks whether GIT_QUIET is set or unset.\n>>\n>> Thanks.\n>>\n>> Will queue with the following log message.\n>>\n>>     submodule update: silence underlying merge/rebase \"--quiet\" is given\n>\n> Missing 'when' before '\"--quiet\"', as Eric noticed.\n>\n> Aside from that,\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n>\n> Thanks, all.\n\nI just noticed that our names were on the original change that\nintroduced the broken GIT_QUIET=0; hopefully this time around we did\na better job at reviewing the change? ;-)\n\nThanks.\n"}]}