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

git pull --verbose with submodules ends in error message

From
FMFink, Mike <mike.fink@samsongroup.com>
Date
Nov 24, 2022, 12:47 UTC
Message-ID
<FR3P281MB21416B718C4C052A28C319B1E90F9@FR3P281MB2141.DEUP281.PROD.OUTLOOK.COM>
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
Next: Sven Strickroth
Message 1 of 9 in “git pull --verbose with submodules ends in error message”
  1. Fink, MikeNov 24, 2022
  2. Sven StrickrothNov 25, 2022
  3. Don't pass -v to submodule commandSven Strickroth, Nov 30, 2022
  4. Ævar Arnfjörð BjarmasonNov 30, 2022
  5. Sven StrickrothDec 1, 2022
  6. Don't pass -v to submodule commandSven Strickroth, Dec 1, 2022
  7. Junio C HamanoDec 2, 2022
  8. submodule: Accept -v for update commandSven Strickroth, Dec 10, 2022
  9. Junio C HamanoDec 18, 2022

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.