{"thread":{"id":"51407","subject":"[Git 2.22.0] git submodule foreach now requires quoted command?","startedAt":"2019-06-29T19:48:09Z","lastAt":"2019-07-02T19:11:36Z","messageCount":3,"participants":["Mateusz Loskot","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"378334","messageId":"CABUeae90FQnxS1FCZLo+5LgMPD9xWQv6w7p7ymCtLdBoOijcRw@mail.gmail.com","threadId":"51407","inReplyTo":null,"subject":"[Git 2.22.0] git submodule foreach now requires quoted command?","fromName":"Mateusz Loskot","fromEmail":"mateusz@loskot.net","sentAt":"2019-06-29T19:47:41Z","receivedAt":"2019-06-29T19:48:09Z","isPatch":false,"sender":{"key":"mateusz@loskot.net","avatar":"https://gravatar.com/avatar/fe5a0ce8995d4986f5c46aad6353e21717808da58e4bc710da1a100e247be239?d=mp&s=160"},"body":"Hi,\n\nI have a script which I have used for long time, with numerous\ngit commands and one of commands is this trivial:\n\ngit submodule foreach --recursive git clean -ffd\n\nI updated to Git 2.22.0 and noticed Git started to complain:\n\n```\n$ cd /d/boost\n$ git submodule foreach --recursive git clean -ffd\nEntering 'libs/accumulators'\nerror: unknown switch `f'\nusage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>\n\n    -q, --quiet           Suppress output of entering each submodule command\n    --recursive           Recurse into nested submodules\n\nfatal: run_command returned non-zero status while recursing in the\nnested submodules of libs/accumulators\n```\n\nApparently, I have to quote the command to avoid the error\n\ngit submodule foreach --recursive 'git clean -ffd'\n\nIs this expected behaviour?\nCould anyone help me to understand what has changed?\nI can't find any related changes in the release notes.\n\nBest regards,\n-- \nMateusz Loskot, http://mateusz.loskot.net\n"},{"id":"378373","messageId":"nycvar.QRO.7.76.6.1907011433531.44@tvgsbejvaqbjf.bet","threadId":"51407","inReplyTo":"CABUeae90FQnxS1FCZLo+5LgMPD9xWQv6w7p7ymCtLdBoOijcRw@mail.gmail.com","subject":"Re: [Git 2.22.0] git submodule foreach now requires quoted command?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-07-01T12:34:18Z","receivedAt":"2019-07-01T12:33:54Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 29 Jun 2019, Mateusz Loskot wrote:\n\n> I have a script which I have used for long time, with numerous\n> git commands and one of commands is this trivial:\n>\n> git submodule foreach --recursive git clean -ffd\n>\n> I updated to Git 2.22.0 and noticed Git started to complain:\n>\n> ```\n> $ cd /d/boost\n> $ git submodule foreach --recursive git clean -ffd\n> Entering 'libs/accumulators'\n> error: unknown switch `f'\n> usage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>\n>\n>     -q, --quiet           Suppress output of entering each submodule command\n>     --recursive           Recurse into nested submodules\n>\n> fatal: run_command returned non-zero status while recursing in the\n> nested submodules of libs/accumulators\n> ```\n>\n> Apparently, I have to quote the command to avoid the error\n>\n> git submodule foreach --recursive 'git clean -ffd'\n>\n> Is this expected behaviour?\n> Could anyone help me to understand what has changed?\n> I can't find any related changes in the release notes.\n\nProbably fixed in https://github.com/gitgitgadget/git/pull/263\n\nCiao,\nJohannes\n"},{"id":"378513","messageId":"CABUeae_NR43F+2-n9NPKUX_h2D+4nhbFT4UAaiBYFBrB5RyP7Q@mail.gmail.com","threadId":"51407","inReplyTo":"nycvar.QRO.7.76.6.1907011433531.44@tvgsbejvaqbjf.bet","subject":"Re: [Git 2.22.0] git submodule foreach now requires quoted command?","fromName":"Mateusz Loskot","fromEmail":"mateusz@loskot.net","sentAt":"2019-07-02T19:11:07Z","receivedAt":"2019-07-02T19:11:36Z","isPatch":false,"sender":{"key":"mateusz@loskot.net","avatar":"https://gravatar.com/avatar/fe5a0ce8995d4986f5c46aad6353e21717808da58e4bc710da1a100e247be239?d=mp&s=160"},"body":"On Mon, 1 Jul 2019 at 14:33, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> On Sat, 29 Jun 2019, Mateusz Loskot wrote:\n>\n> > I have a script which I have used for long time, with numerous\n> > git commands and one of commands is this trivial:\n> >\n> > git submodule foreach --recursive git clean -ffd\n> >\n> > I updated to Git 2.22.0 and noticed Git started to complain:\n> >\n> > ```\n> > $ cd /d/boost\n> > $ git submodule foreach --recursive git clean -ffd\n> > Entering 'libs/accumulators'\n> > error: unknown switch `f'\n> > usage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>\n> >\n> >     -q, --quiet           Suppress output of entering each submodule command\n> >     --recursive           Recurse into nested submodules\n> >\n> > fatal: run_command returned non-zero status while recursing in the\n> > nested submodules of libs/accumulators\n> > ```\n> >\n> > Apparently, I have to quote the command to avoid the error\n> >\n> > git submodule foreach --recursive 'git clean -ffd'\n> >\n> > Is this expected behaviour?\n> > Could anyone help me to understand what has changed?\n> > I can't find any related changes in the release notes.\n>\n> Probably fixed in https://github.com/gitgitgadget/git/pull/263\n\n\nJohannes,\n\nThank you for the pointer.\nIt does seem related indeed.\n\nBest regards,\n-- \nMateusz Loskot, http://mateusz.loskot.net\n"}]}