git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* git pull --verbose with submodules ends in error message
@ 2022-11-24 12:47 Fink, Mike
  2022-11-25 15:56 ` Sven Strickroth
  0 siblings, 1 reply; 2+ messages in thread
From: Fink, Mike @ 2022-11-24 12:47 UTC (permalink / raw)
  To: git; +Cc: Stein, Christoph, Scholz, Marco, Walch, Emmanuel

Dear Sir or Madam, 


Bug Description
===============

when doing a git pull on a repository with submodules, the --verbose option causes an error message like: 
usage: git submodule [--quiet] [--cached]
   or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
... and so on.
Exit code is 1

This happens, when recursing the submodules. Either add to .gitconfig:
[submodule]
	recurse = true
or use --recurse-submodules for the git pull command.

Version 2.37.3-64-bit is OK.
Version 2.38.1-64-bit is shows the error.
Reproducible on Windows and Linux


How to Reproduce
================
# steps to reproduce: 
# run the following commands in a debian:sid container, 
# e.g. "docker container run -it debian:sid".

# Any other environment with git 2.38.1 should be fine, too. 
# Git for windows 2.38.1 also shows the same behaviour.

# install git 2.38.1 (at the time of writing) and clone a public repo with submodules
$ apt update && apt install git
$ git clone --recurse-submodules https://gitlab.com/tortoisegit/tortoisegit.git
$ cd tortoisegit

# this one succeeds
$ git pull --recurse-submodules

# this one fails after fetching the submodules, showing 
# the "git submodule" help text as if we had made a "git submodule" 
# call with insufficient/wrong arguments.
$ git pull --recurse-submodules --verbose


Workaround
==========
1) Do not use --verbose when pulling a repository with submodules.
   Unfortunately this workaround does not apply to our workflow, 
   since we happily use TortoiseGit as our graphical Git client on windows. 
   TortoiseGit automatically uses the option -v (--verbose).
   $ git.exe pull --progress -v --no-rebase "origin"
2) Use Version 2.37.3-64-bit. 


Questions
=========
Any questions regarding this bug description? Happy to help.


Kind regards, Mike.

--

Mike Fink
Softwareentwickler
E44

SAMSON AKTIENGESELLSCHAFT
Weismüllerstraße 3 · 60314 Frankfurt am Main

Telefon: +49 69 4009-1682
E-Mail: Mike.Fink@samsongroup.com · Internet: www.samsongroup.com



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

* Re: git pull --verbose with submodules ends in error message
  2022-11-24 12:47 git pull --verbose with submodules ends in error message Fink, Mike
@ 2022-11-25 15:56 ` Sven Strickroth
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Strickroth @ 2022-11-25 15:56 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Stefan Beller, Robin H. Johnson

Hi,

the reason for the failure of the submodule command after issuing
"git pull -v --recurse-submodules"
is that the verbosity of the pull command is passed to the submodules. 
Commit a56771a668dd4963675914bc5da0e1e015952dae introduced this regression.

I suppose the intention was to pass the '-q' flag to the submodule 
command, but the issue is that also '-v' is passed which, however, is 
not supported by the submodule command.

So, either don't pass '-v' to the submodule command or add it there...

Best,
  Sven

Am 24.11.2022 um 13:47 schrieb Fink, Mike:
> Dear Sir or Madam,
> 
> 
> Bug Description
> ===============
> 
> when doing a git pull on a repository with submodules, the --verbose option causes an error message like:
> usage: git submodule [--quiet] [--cached]
>     or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
> ... and so on.
> Exit code is 1
> 
> This happens, when recursing the submodules. Either add to .gitconfig:
> [submodule]
> 	recurse = true
> or use --recurse-submodules for the git pull command.
> 
> Version 2.37.3-64-bit is OK.
> Version 2.38.1-64-bit is shows the error.
> Reproducible on Windows and Linux
> 
> 
> How to Reproduce
> ================
> # steps to reproduce:
> # run the following commands in a debian:sid container,
> # e.g. "docker container run -it debian:sid".
> 
> # Any other environment with git 2.38.1 should be fine, too.
> # Git for windows 2.38.1 also shows the same behaviour.
> 
> # install git 2.38.1 (at the time of writing) and clone a public repo with submodules
> $ apt update && apt install git
> $ git clone --recurse-submodules https://gitlab.com/tortoisegit/tortoisegit.git
> $ cd tortoisegit
> 
> # this one succeeds
> $ git pull --recurse-submodules
> 
> # this one fails after fetching the submodules, showing
> # the "git submodule" help text as if we had made a "git submodule"
> # call with insufficient/wrong arguments.
> $ git pull --recurse-submodules --verbose
> 
> 
> Workaround
> ==========
> 1) Do not use --verbose when pulling a repository with submodules.
>     Unfortunately this workaround does not apply to our workflow,
>     since we happily use TortoiseGit as our graphical Git client on windows.
>     TortoiseGit automatically uses the option -v (--verbose).
>     $ git.exe pull --progress -v --no-rebase "origin"
> 2) Use Version 2.37.3-64-bit.
> 
> 
> Questions
> =========
> Any questions regarding this bug description? Happy to help.
> 
> 
> Kind regards, Mike.


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

end of thread, other threads:[~2022-11-25 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 12:47 git pull --verbose with submodules ends in error message Fink, Mike
2022-11-25 15:56 ` Sven Strickroth

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).