git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [Git 2.22.0] git submodule foreach now requires quoted command?
@ 2019-06-29 19:47 Mateusz Loskot
  2019-07-01 12:34 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Mateusz Loskot @ 2019-06-29 19:47 UTC (permalink / raw)
  To: git

Hi,

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.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Git 2.22.0] git submodule foreach now requires quoted command?
  2019-06-29 19:47 [Git 2.22.0] git submodule foreach now requires quoted command? Mateusz Loskot
@ 2019-07-01 12:34 ` Johannes Schindelin
  2019-07-02 19:11   ` Mateusz Loskot
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2019-07-01 12:34 UTC (permalink / raw)
  To: Mateusz Loskot; +Cc: git

Hi,

On Sat, 29 Jun 2019, Mateusz Loskot wrote:

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Git 2.22.0] git submodule foreach now requires quoted command?
  2019-07-01 12:34 ` Johannes Schindelin
@ 2019-07-02 19:11   ` Mateusz Loskot
  0 siblings, 0 replies; 3+ messages in thread
From: Mateusz Loskot @ 2019-07-02 19:11 UTC (permalink / raw)
  To: git

On Mon, 1 Jul 2019 at 14:33, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> On Sat, 29 Jun 2019, Mateusz Loskot wrote:
>
> > 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


Johannes,

Thank you for the pointer.
It does seem related indeed.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-02 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-29 19:47 [Git 2.22.0] git submodule foreach now requires quoted command? Mateusz Loskot
2019-07-01 12:34 ` Johannes Schindelin
2019-07-02 19:11   ` Mateusz Loskot

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).