* [ISSUE] `git submodule update --init --recursive` does ignore `fetchRecurseSubmodules` flag in `.gitmodules` and in `.git/config`
@ 2024-06-10 1:19 Andry
2024-06-10 22:02 ` brian m. carlson
0 siblings, 1 reply; 2+ messages in thread
From: Andry @ 2024-06-10 1:19 UTC (permalink / raw)
To: Git
Hello Git,
First discovered here: https://github.com/gitextensions/gitextensions/issues/11783
Another discussion: https://stackoverflow.com/questions/58403616/does-git-submodule-update-recursive-override-fetchrecursesubmodules
Manual: https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submoduleltnamegtfetchRecurseSubmodules
---
If use a recursive submodule, for example:
A->B->A->...
And call submodules Update on A, then the Update does ignore the flag and keeps fetch recursively with the error at the end:
> fatal: Failed to recurse into submodule path ...
Is that supposed to work this way or is an bug?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ISSUE] `git submodule update --init --recursive` does ignore `fetchRecurseSubmodules` flag in `.gitmodules` and in `.git/config`
2024-06-10 1:19 [ISSUE] `git submodule update --init --recursive` does ignore `fetchRecurseSubmodules` flag in `.gitmodules` and in `.git/config` Andry
@ 2024-06-10 22:02 ` brian m. carlson
0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2024-06-10 22:02 UTC (permalink / raw)
To: Andry; +Cc: Git
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
On 2024-06-10 at 01:19:10, Andry wrote:
> Hello Git,
>
> First discovered here: https://github.com/gitextensions/gitextensions/issues/11783
> Another discussion: https://stackoverflow.com/questions/58403616/does-git-submodule-update-recursive-override-fetchrecursesubmodules
> Manual: https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submoduleltnamegtfetchRecurseSubmodules
> ---
>
> If use a recursive submodule, for example:
>
> A->B->A->...
>
> And call submodules Update on A, then the Update does ignore the flag and keeps fetch recursively with the error at the end:
>
> > fatal: Failed to recurse into submodule path ...
>
> Is that supposed to work this way or is an bug?
Yes, it's working as designed. From the documentation,
`fetchRecurseSubmodules` only applies to `git fetch` and `git pull`, not
`git submodule`. Even if it did, you still specified recursive
behaviour in a command-line option, and command-line operations override
the configuration.
If you don't want recursion, you'll need to skip the `--recursive` flag.
--
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-10 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10 1:19 [ISSUE] `git submodule update --init --recursive` does ignore `fetchRecurseSubmodules` flag in `.gitmodules` and in `.git/config` Andry
2024-06-10 22:02 ` brian m. carlson
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 NNTP newsgroup(s).