git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Git 2.22.0] git submodule foreach now requires quoted command?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 1, 2019, 12:34 UTC
Message-ID
<nycvar.QRO.7.76.6.1907011433531.44@tvgsbejvaqbjf.bet>
In-Reply-To
<CABUeae90FQnxS1FCZLo+5LgMPD9xWQv6w7p7ymCtLdBoOijcRw@mail.gmail.com>
Hi,
On Sat, 29 Jun 2019, Mateusz Loskot wrote:
Show 28 quoted lines
> I have a script which I have used for long time, with numerous
> git commands and one of commands is this trivial:
>
> git submodule foreach --recursive git clean -ffd
>
> I updated to Git 2.22.0 and noticed Git started to complain:
>
> ```
> $ cd /d/boost
> $ git submodule foreach --recursive git clean -ffd
> Entering 'libs/accumulators'
> error: unknown switch `f'
> usage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>
>
>     -q, --quiet           Suppress output of entering each submodule command
>     --recursive           Recurse into nested submodules
>
> fatal: run_command returned non-zero status while recursing in the
> nested submodules of libs/accumulators
> ```
>
> Apparently, I have to quote the command to avoid the error
>
> git submodule foreach --recursive 'git clean -ffd'
>
> Is this expected behaviour?
> Could anyone help me to understand what has changed?
> I can't find any related changes in the release notes.
Probably fixed in https://github.com/gitgitgadget/git/pull/263

Ciao, Johannes

Previous: Mateusz LoskotNext: Mateusz Loskot
Message 2 of 3 in “[Git 2.22.0] git submodule foreach now requires quoted command?”
  1. Mateusz LoskotJun 29, 2019
  2. Johannes SchindelinJul 1, 2019
  3. Mateusz LoskotJul 2, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.