git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sven Strickroth <sven@cs-ware.de>
To: git <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Stefan Beller <sbeller@google.com>,
	"Robin H. Johnson" <robbat2@gentoo.org>
Subject: Re: git pull --verbose with submodules ends in error message
Date: Fri, 25 Nov 2022 16:56:09 +0100	[thread overview]
Message-ID: <1ff185c5-4a9e-36e3-3141-8b149c1c7bb0@cs-ware.de> (raw)
In-Reply-To: <FR3P281MB21416B718C4C052A28C319B1E90F9@FR3P281MB2141.DEUP281.PROD.OUTLOOK.COM>

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.


  reply	other threads:[~2022-11-25 16:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 12:47 git pull --verbose with submodules ends in error message Fink, Mike
2022-11-25 15:56 ` Sven Strickroth [this message]
2022-11-30 18:30   ` [PATCH] Don't pass -v to submodule command Sven Strickroth
2022-11-30 19:17     ` Ævar Arnfjörð Bjarmason
2022-12-01  8:32       ` Sven Strickroth
2022-12-01  8:34         ` [PATCH v2] " Sven Strickroth
2022-12-02  0:24       ` [PATCH] " Junio C Hamano
2022-12-10 13:06         ` [PATCH] submodule: Accept -v for update command Sven Strickroth
2022-12-18  1:25           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ff185c5-4a9e-36e3-3141-8b149c1c7bb0@cs-ware.de \
    --to=sven@cs-ware.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=robbat2@gentoo.org \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).