{"thread":{"id":"58851","subject":"git pull --verbose with submodules ends in error message","startedAt":"2022-11-24T12:52:33Z","lastAt":"2022-12-18T01:32:14Z","messageCount":9,"participants":["Fink, Mike","Sven Strickroth","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"467932","messageId":"FR3P281MB21416B718C4C052A28C319B1E90F9@FR3P281MB2141.DEUP281.PROD.OUTLOOK.COM","threadId":"58851","inReplyTo":null,"subject":"git pull --verbose with submodules ends in error message","fromName":"Fink, Mike","fromEmail":"mike.fink@samsongroup.com","sentAt":"2022-11-24T12:47:11Z","receivedAt":"2022-11-24T12:52:33Z","isPatch":false,"sender":{"key":"mike.fink@samsongroup.com","avatar":null},"body":"Dear Sir or Madam, \n\n\nBug Description\n===============\n\nwhen doing a git pull on a repository with submodules, the --verbose option causes an error message like: \nusage: git submodule [--quiet] [--cached]\n   or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]\n... and so on.\nExit code is 1\n\nThis happens, when recursing the submodules. Either add to .gitconfig:\n[submodule]\n\trecurse = true\nor use --recurse-submodules for the git pull command.\n\nVersion 2.37.3-64-bit is OK.\nVersion 2.38.1-64-bit is shows the error.\nReproducible on Windows and Linux\n\n\nHow to Reproduce\n================\n# steps to reproduce: \n# run the following commands in a debian:sid container, \n# e.g. \"docker container run -it debian:sid\".\n\n# Any other environment with git 2.38.1 should be fine, too. \n# Git for windows 2.38.1 also shows the same behaviour.\n\n# install git 2.38.1 (at the time of writing) and clone a public repo with submodules\n$ apt update && apt install git\n$ git clone --recurse-submodules https://gitlab.com/tortoisegit/tortoisegit.git\n$ cd tortoisegit\n\n# this one succeeds\n$ git pull --recurse-submodules\n\n# this one fails after fetching the submodules, showing \n# the \"git submodule\" help text as if we had made a \"git submodule\" \n# call with insufficient/wrong arguments.\n$ git pull --recurse-submodules --verbose\n\n\nWorkaround\n==========\n1) Do not use --verbose when pulling a repository with submodules.\n   Unfortunately this workaround does not apply to our workflow, \n   since we happily use TortoiseGit as our graphical Git client on windows. \n   TortoiseGit automatically uses the option -v (--verbose).\n   $ git.exe pull --progress -v --no-rebase \"origin\"\n2) Use Version 2.37.3-64-bit. \n\n\nQuestions\n=========\nAny questions regarding this bug description? Happy to help.\n\n\nKind regards, Mike.\n\n--\n\nMike Fink\nSoftwareentwickler\nE44\n\nSAMSON AKTIENGESELLSCHAFT\nWeismüllerstraße 3 · 60314 Frankfurt am Main\n\nTelefon: +49 69 4009-1682\nE-Mail: Mike.Fink@samsongroup.com · Internet: www.samsongroup.com\n\n\n"},{"id":"467999","messageId":"1ff185c5-4a9e-36e3-3141-8b149c1c7bb0@cs-ware.de","threadId":"58851","inReplyTo":"FR3P281MB21416B718C4C052A28C319B1E90F9@FR3P281MB2141.DEUP281.PROD.OUTLOOK.COM","subject":"Re: git pull --verbose with submodules ends in error message","fromName":"Sven Strickroth","fromEmail":"sven@cs-ware.de","sentAt":"2022-11-25T15:56:09Z","receivedAt":"2022-11-25T16:01:30Z","isPatch":false,"sender":{"key":"sven@cs-ware.de","avatar":null},"body":"Hi,\n\nthe reason for the failure of the submodule command after issuing\n\"git pull -v --recurse-submodules\"\nis that the verbosity of the pull command is passed to the submodules. \nCommit a56771a668dd4963675914bc5da0e1e015952dae introduced this regression.\n\nI suppose the intention was to pass the '-q' flag to the submodule \ncommand, but the issue is that also '-v' is passed which, however, is \nnot supported by the submodule command.\n\nSo, either don't pass '-v' to the submodule command or add it there...\n\nBest,\n  Sven\n\nAm 24.11.2022 um 13:47 schrieb Fink, Mike:\n> Dear Sir or Madam,\n> \n> \n> Bug Description\n> ===============\n> \n> when doing a git pull on a repository with submodules, the --verbose option causes an error message like:\n> usage: git submodule [--quiet] [--cached]\n>     or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]\n> ... and so on.\n> Exit code is 1\n> \n> This happens, when recursing the submodules. Either add to .gitconfig:\n> [submodule]\n> \trecurse = true\n> or use --recurse-submodules for the git pull command.\n> \n> Version 2.37.3-64-bit is OK.\n> Version 2.38.1-64-bit is shows the error.\n> Reproducible on Windows and Linux\n> \n> \n> How to Reproduce\n> ================\n> # steps to reproduce:\n> # run the following commands in a debian:sid container,\n> # e.g. \"docker container run -it debian:sid\".\n> \n> # Any other environment with git 2.38.1 should be fine, too.\n> # Git for windows 2.38.1 also shows the same behaviour.\n> \n> # install git 2.38.1 (at the time of writing) and clone a public repo with submodules\n> $ apt update && apt install git\n> $ git clone --recurse-submodules https://gitlab.com/tortoisegit/tortoisegit.git\n> $ cd tortoisegit\n> \n> # this one succeeds\n> $ git pull --recurse-submodules\n> \n> # this one fails after fetching the submodules, showing\n> # the \"git submodule\" help text as if we had made a \"git submodule\"\n> # call with insufficient/wrong arguments.\n> $ git pull --recurse-submodules --verbose\n> \n> \n> Workaround\n> ==========\n> 1) Do not use --verbose when pulling a repository with submodules.\n>     Unfortunately this workaround does not apply to our workflow,\n>     since we happily use TortoiseGit as our graphical Git client on windows.\n>     TortoiseGit automatically uses the option -v (--verbose).\n>     $ git.exe pull --progress -v --no-rebase \"origin\"\n> 2) Use Version 2.37.3-64-bit.\n> \n> \n> Questions\n> =========\n> Any questions regarding this bug description? Happy to help.\n> \n> \n> Kind regards, Mike.\n\n"},{"id":"468269","messageId":"cad05012-7bf9-5975-3add-253b11c7bcc8@cs-ware.de","threadId":"58851","inReplyTo":"1ff185c5-4a9e-36e3-3141-8b149c1c7bb0@cs-ware.de","subject":"[PATCH] Don't pass -v to submodule command","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2022-11-30T18:30:31Z","receivedAt":"2022-11-30T18:37:02Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"\"git pull -v --recurse-submodules\" propagates the \"-v\" to the submdoule\ncommand which does not support \"-v\".\n\nCommit a56771a668dd4963675914bc5da0e1e015952dae introduced this\nregression.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n  builtin/pull.c | 12 ++++++------\n  1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/pull.c b/builtin/pull.c\nindex 1ab4de0005..b67320fa5f 100644\n--- a/builtin/pull.c\n+++ b/builtin/pull.c\n@@ -256,7 +256,7 @@ static struct option pull_options[] = {\n  /**\n   * Pushes \"-q\" or \"-v\" switches into arr to match the opt_verbosity level.\n   */\n-static void argv_push_verbosity(struct strvec *arr)\n+static void argv_push_verbosity(struct strvec *arr, int include_v)\n  {\n  \tint verbosity;\n\n@@ -520,7 +520,7 @@ static int run_fetch(const char *repo, const char **refspecs)\n  \tstrvec_pushl(&cmd.args, \"fetch\", \"--update-head-ok\", NULL);\n\n  \t/* Shared options */\n-\targv_push_verbosity(&cmd.args);\n+\targv_push_verbosity(&cmd.args, 1);\n  \tif (opt_progress)\n  \t\tstrvec_push(&cmd.args, opt_progress);\n\n@@ -629,7 +629,7 @@ static int rebase_submodules(void)\n  \tcp.no_stdin = 1;\n  \tstrvec_pushl(&cp.args, \"submodule\", \"update\",\n  \t\t     \"--recursive\", \"--rebase\", NULL);\n-\targv_push_verbosity(&cp.args);\n+\targv_push_verbosity(&cp.args, 0);\n\n  \treturn run_command(&cp);\n  }\n@@ -642,7 +642,7 @@ static int update_submodules(void)\n  \tcp.no_stdin = 1;\n  \tstrvec_pushl(&cp.args, \"submodule\", \"update\",\n  \t\t     \"--recursive\", \"--checkout\", NULL);\n-\targv_push_verbosity(&cp.args);\n+\targv_push_verbosity(&cp.args, 0);\n\n  \treturn run_command(&cp);\n  }\n@@ -657,7 +657,7 @@ static int run_merge(void)\n  \tstrvec_pushl(&cmd.args, \"merge\", NULL);\n\n  \t/* Shared options */\n-\targv_push_verbosity(&cmd.args);\n+\targv_push_verbosity(&cmd.args, 1);\n  \tif (opt_progress)\n  \t\tstrvec_push(&cmd.args, opt_progress);\n\n@@ -881,7 +881,7 @@ static int run_rebase(const struct object_id *newbase,\n  \tstrvec_push(&cmd.args, \"rebase\");\n\n  \t/* Shared options */\n-\targv_push_verbosity(&cmd.args);\n+\targv_push_verbosity(&cmd.args, 1);\n\n  \t/* Options passed to git-rebase */\n  \tif (opt_rebase == REBASE_MERGES)\n-- \n2.38.1.windows.1\n"},{"id":"468276","messageId":"221130.868rjsi6bn.gmgdl@evledraar.gmail.com","threadId":"58851","inReplyTo":"cad05012-7bf9-5975-3add-253b11c7bcc8@cs-ware.de","subject":"Re: [PATCH] Don't pass -v to submodule command","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-11-30T19:17:23Z","receivedAt":"2022-11-30T19:35:32Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Nov 30 2022, Sven Strickroth wrote:\n\n> \"git pull -v --recurse-submodules\" propagates the \"-v\" to the submdoule\n> command which does not support \"-v\".\n>\n> Commit a56771a668dd4963675914bc5da0e1e015952dae introduced this\n> regression.\n\nWe refer to commits in commit messages like this: a56771a668d\n(builtin/pull: respect verbosity settings in submodules, 2018-01-25);\n\nWhich also shows that this regression is quite old.\n\n> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n> ---\n>  builtin/pull.c | 12 ++++++------\n>  1 file changed, 6 insertions(+), 6 deletions(-)\n>\n> diff --git a/builtin/pull.c b/builtin/pull.c\n> index 1ab4de0005..b67320fa5f 100644\n> --- a/builtin/pull.c\n> +++ b/builtin/pull.c\n> @@ -256,7 +256,7 @@ static struct option pull_options[] = {\n>  /**\n>   * Pushes \"-q\" or \"-v\" switches into arr to match the opt_verbosity level.\n>   */\n> -static void argv_push_verbosity(struct strvec *arr)\n> +static void argv_push_verbosity(struct strvec *arr, int include_v)\n>  {\n>  \tint verbosity;\n>\n\nIt looks like you're getting somewhere with this, but you never use this\n\"include_v\", so the bug is still there. We just have the scaffolding\nnow.\n\nDid you forget to add that part to this commit?\n\nIn any case, that serves as a comment on the other thing this patch\nreally needs: tests, please add some.\n\nI can reproduce this locally by just running the command you noted in a\nrepo with submodules, so presumably we can use some of the existing\nsubmodule tests, which have already set up such a repo.\n\n> @@ -520,7 +520,7 @@ static int run_fetch(const char *repo, const char **refspecs)\n>  \tstrvec_pushl(&cmd.args, \"fetch\", \"--update-head-ok\", NULL);\n>\n>  \t/* Shared options */\n> -\targv_push_verbosity(&cmd.args);\n> +\targv_push_verbosity(&cmd.args, 1);\n>  \tif (opt_progress)\n>  \t\tstrvec_push(&cmd.args, opt_progress);\n>\n> @@ -629,7 +629,7 @@ static int rebase_submodules(void)\n>  \tcp.no_stdin = 1;\n>  \tstrvec_pushl(&cp.args, \"submodule\", \"update\",\n>  \t\t     \"--recursive\", \"--rebase\", NULL);\n> -\targv_push_verbosity(&cp.args);\n> +\targv_push_verbosity(&cp.args, 0);\n>\n>  \treturn run_command(&cp);\n>  }\n> @@ -642,7 +642,7 @@ static int update_submodules(void)\n>  \tcp.no_stdin = 1;\n>  \tstrvec_pushl(&cp.args, \"submodule\", \"update\",\n>  \t\t     \"--recursive\", \"--checkout\", NULL);\n> -\targv_push_verbosity(&cp.args);\n> +\targv_push_verbosity(&cp.args, 0);\n>\n>  \treturn run_command(&cp);\n>  }\n> @@ -657,7 +657,7 @@ static int run_merge(void)\n>  \tstrvec_pushl(&cmd.args, \"merge\", NULL);\n>\n>  \t/* Shared options */\n> -\targv_push_verbosity(&cmd.args);\n> +\targv_push_verbosity(&cmd.args, 1);\n>  \tif (opt_progress)\n>  \t\tstrvec_push(&cmd.args, opt_progress);\n>\n> @@ -881,7 +881,7 @@ static int run_rebase(const struct object_id *newbase,\n>  \tstrvec_push(&cmd.args, \"rebase\");\n>\n>  \t/* Shared options */\n> -\targv_push_verbosity(&cmd.args);\n> +\targv_push_verbosity(&cmd.args, 1);\n>\n>  \t/* Options passed to git-rebase */\n>  \tif (opt_rebase == REBASE_MERGES)\n\nI think the right longer term fix here is to simply make \"git submodule\"\nsupport \"-v\" and \"--verbose\".\n\nWhich, as a funny implementation detail we'd support if we called \"git\nsubmodule--helper update\", as its OPT__QUIET() adds both variants, but\nthe git-submodule.sh doesn't support it.\n\nOTOH we've never supported it in \"git submodule\", so maybe we should\njust make the C version stricter, I dunno...\n\nIn any case, this is a good fix for now, let's just stop passing the\nunsupported flag.\n"},{"id":"468307","messageId":"80d5eb7c-c668-d325-2aaa-cbee742d1f15@cs-ware.de","threadId":"58851","inReplyTo":"221130.868rjsi6bn.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] Don't pass -v to submodule command","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2022-12-01T08:32:09Z","receivedAt":"2022-12-01T08:32:31Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"Am 30.11.2022 um 20:17 schrieb Ævar Arnfjörð Bjarmason:\n>> --- a/builtin/pull.c\n>> +++ b/builtin/pull.c\n>> @@ -256,7 +256,7 @@ static struct option pull_options[] = {\n>>   /**\n>>    * Pushes \"-q\" or \"-v\" switches into arr to match the opt_verbosity level.\n>>    */\n>> -static void argv_push_verbosity(struct strvec *arr)\n>> +static void argv_push_verbosity(struct strvec *arr, int include_v)\n>>   {\n>>   \tint verbosity;\n>>\n> \n> It looks like you're getting somewhere with this, but you never use this\n> \"include_v\", so the bug is still there. We just have the scaffolding\n> now.\n> \n> Did you forget to add that part to this commit?\n\nOpps, seems so.\n\n> In any case, that serves as a comment on the other thing this patch\n> really needs: tests, please add some.\n\nI don't know how to add tests and don't have a fully fledged build \nenvironment for git here.\n\n-- \nBest regards,\n   Sven Strickroth\n   PGP key id F5A9D4C4 @ any key-server\n\n"},{"id":"468308","messageId":"49a10767-8cdf-4c40-eb74-c7c61b80b7e7@cs-ware.de","threadId":"58851","inReplyTo":"80d5eb7c-c668-d325-2aaa-cbee742d1f15@cs-ware.de","subject":"[PATCH v2] Don't pass -v to submodule command","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2022-12-01T08:34:53Z","receivedAt":"2022-12-01T08:35:13Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"\"git pull -v --recurse-submodules\" propagates the \"-v\" to the submdoule\ncommand which does not support \"-v\" yet.\n\nCommit a56771a668d introduced this regression.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n  builtin/pull.c | 14 +++++++-------\n  1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin/pull.c b/builtin/pull.c\nindex 1ab4de0005..c7f65b39ec 100644\n--- a/builtin/pull.c\n+++ b/builtin/pull.c\n@@ -256,11 +256,11 @@ static struct option pull_options[] = {\n  /**\n   * Pushes \"-q\" or \"-v\" switches into arr to match the opt_verbosity level.\n   */\n-static void argv_push_verbosity(struct strvec *arr)\n+static void argv_push_verbosity(struct strvec *arr, int include_v)\n  {\n  \tint verbosity;\n\n-\tfor (verbosity = opt_verbosity; verbosity > 0; verbosity--)\n+\tfor (verbosity = opt_verbosity; include_v && verbosity > 0; verbosity--)\n  \t\tstrvec_push(arr, \"-v\");\n\n  \tfor (verbosity = opt_verbosity; verbosity < 0; verbosity++)\n@@ -520,7 +520,7 @@ static int run_fetch(const char *repo, const char **refspecs)\n  \tstrvec_pushl(&cmd.args, \"fetch\", \"--update-head-ok\", NULL);\n\n  \t/* Shared options */\n-\targv_push_verbosity(&cmd.args);\n+\targv_push_verbosity(&cmd.args, 1);\n  \tif (opt_progress)\n  \t\tstrvec_push(&cmd.args, opt_progress);\n\n@@ -629,7 +629,7 @@ static int rebase_submodules(void)\n  \tcp.no_stdin = 1;\n  \tstrvec_pushl(&cp.args, \"submodule\", \"update\",\n  \t\t     \"--recursive\", \"--rebase\", NULL);\n-\targv_push_verbosity(&cp.args);\n+\targv_push_verbosity(&cp.args, 0);\n\n  \treturn run_command(&cp);\n  }\n@@ -642,7 +642,7 @@ static int update_submodules(void)\n  \tcp.no_stdin = 1;\n  \tstrvec_pushl(&cp.args, \"submodule\", \"update\",\n  \t\t     \"--recursive\", \"--checkout\", NULL);\n-\targv_push_verbosity(&cp.args);\n+\targv_push_verbosity(&cp.args, 0);\n\n  \treturn run_command(&cp);\n  }\n@@ -657,7 +657,7 @@ static int run_merge(void)\n  \tstrvec_pushl(&cmd.args, \"merge\", NULL);\n\n  \t/* Shared options */\n-\targv_push_verbosity(&cmd.args);\n+\targv_push_verbosity(&cmd.args, 1);\n  \tif (opt_progress)\n  \t\tstrvec_push(&cmd.args, opt_progress);\n\n@@ -881,7 +881,7 @@ static int run_rebase(const struct object_id *newbase,\n  \tstrvec_push(&cmd.args, \"rebase\");\n\n  \t/* Shared options */\n-\targv_push_verbosity(&cmd.args);\n+\targv_push_verbosity(&cmd.args, 1);\n\n  \t/* Options passed to git-rebase */\n  \tif (opt_rebase == REBASE_MERGES)\n-- \n2.38.1.windows.1\n\n\n"},{"id":"468383","messageId":"xmqqiliur6t9.fsf@gitster.g","threadId":"58851","inReplyTo":"221130.868rjsi6bn.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] Don't pass -v to submodule command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-12-02T00:24:34Z","receivedAt":"2022-12-02T00:29:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Wed, Nov 30 2022, Sven Strickroth wrote:\n>\n>> \"git pull -v --recurse-submodules\" propagates the \"-v\" to the submdoule\n>> command which does not support \"-v\".\n>>\n>> Commit a56771a668dd4963675914bc5da0e1e015952dae introduced this\n>> regression.\n>\n> We refer to commits in commit messages like this: a56771a668d\n> (builtin/pull: respect verbosity settings in submodules, 2018-01-25);\n>\n> Which also shows that this regression is quite old.\n\nGood point.\n\nWhile we are commenting on the proposed log message, this subject\n\n> Subject: [PATCH] Don't pass -v to submodule command\n\nis not sufficient to identify the change and remind readers what it\nis about when it is shown among \"git shortlog --no-merges\".  We give\n\"<area>:\" prefix before the title to help that, e.g.\n\n    Subject: [PATCH] pull: don't pass -v to \"git submodule update\"\n\nor something like that.\n\n>> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n>> ---\n>>  builtin/pull.c | 12 ++++++------\n>>  1 file changed, 6 insertions(+), 6 deletions(-)\n>>\n>> diff --git a/builtin/pull.c b/builtin/pull.c\n>> index 1ab4de0005..b67320fa5f 100644\n>> --- a/builtin/pull.c\n>> +++ b/builtin/pull.c\n>> @@ -256,7 +256,7 @@ static struct option pull_options[] = {\n>>  /**\n>>   * Pushes \"-q\" or \"-v\" switches into arr to match the opt_verbosity level.\n>>   */\n>> -static void argv_push_verbosity(struct strvec *arr)\n>> +static void argv_push_verbosity(struct strvec *arr, int include_v)\n>>  {\n>>  \tint verbosity;\n>>\n>\n> It looks like you're getting somewhere with this, but you never use this\n> \"include_v\", so the bug is still there. We just have the scaffolding\n> now.\n\nWhat is the plan to cope with the evolution of \"git submodule\nupdate\" command, though?  Will \"-v\" forever be the single option we\nmay get at \"git pull\" level that will never be supported by \"git\nsubmodule update\"?  I am guessing that the reason we want to call\nthis flag \"include_v\" is because it is the author's intention that\n\"git submodule update\" will not change in this regard, and am\nwondering if that is a healthy assumption.\n\n> Did you forget to add that part to this commit?\n>\n> In any case, that serves as a comment on the other thing this patch\n> really needs: tests, please add some.\n\nGood advice.\n\n> I think the right longer term fix here is to simply make \"git submodule\"\n> support \"-v\" and \"--verbose\".\n\nYup.\n"},{"id":"468856","messageId":"f805f2da-a7e1-9fde-cc0a-04a30f79c9af@cs-ware.de","threadId":"58851","inReplyTo":"xmqqiliur6t9.fsf@gitster.g","subject":"[PATCH] submodule: Accept -v for update command","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2022-12-10T13:06:37Z","receivedAt":"2022-12-10T13:07:04Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"\"git pull -v --recurse-submodules\" propagates the \"-v\" to the submodule \ncommand which did not support \"-v\" yet.\n\nCommit a56771a668d introduced this regression.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n  git-submodule.sh | 3 +++\n  1 file changed, 3 insertions(+)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 9a50f2e912..7f9582d923 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -244,6 +244,9 @@ cmd_update()\n  \t\t-q|--quiet)\n  \t\t\tquiet=1\n  \t\t\t;;\n+\t\t-v|--verbose)\n+\t\t\tquiet=0\n+\t\t\t;;\n  \t\t--progress)\n  \t\t\tprogress=1\n  \t\t\t;;\n-- \n2.38.1.windows.1\n\n"},{"id":"469236","messageId":"xmqqedsxzen6.fsf@gitster.g","threadId":"58851","inReplyTo":"f805f2da-a7e1-9fde-cc0a-04a30f79c9af@cs-ware.de","subject":"Re: [PATCH] submodule: Accept -v for update command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-12-18T01:25:49Z","receivedAt":"2022-12-18T01:32:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Strickroth <email@cs-ware.de> writes:\n\n> Subject: Re: [PATCH] submodule: Accept -v for update command\n>\n> \"git pull -v --recurse-submodules\" propagates the \"-v\" to the\n> submodule command which did not support \"-v\" yet.\n>\n> Commit a56771a668d introduced this regression.\n>\n> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n> ---\n\nThis unfortunately fell in the cracks.  Thanks for a few people who\nreported the issue this patch tried to fix recently (it is curous\nwhy this regression that is almost 5 years old suddenly started\nbiting people).\n\nApplying the improvement suggestions given in the review messages to\nthe other patch to deal with this regression from the \"pull\" side,\nlet's explain the commit this way:\n\n    Subject: [PATCH] submodule: accept -v for the update command\n\n    Since a56771a6 (builtin/pull: respect verbosity settings in\n    submodules, 2018-01-25), \"git pull -v --recurse-submodules\"\n    propagates the \"-v\" to the submodule command, but because the\n    latter command does not understand the option, it barfs.\n\n    Teach \"git submodule update\" to accept the option to fix it.\n\n    Signed-off-by: Sven Strickroth <email@cs-ware.de>\n    \nThanks.\n\n>  git-submodule.sh | 3 +++\n>  1 file changed, 3 insertions(+)\n>\n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index 9a50f2e912..7f9582d923 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -244,6 +244,9 @@ cmd_update()\n>  \t\t-q|--quiet)\n>  \t\t\tquiet=1\n>  \t\t\t;;\n> +\t\t-v|--verbose)\n> +\t\t\tquiet=0\n> +\t\t\t;;\n>  \t\t--progress)\n>  \t\t\tprogress=1\n>  \t\t\t;;\n"}]}