git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: git config order affects outcome for recurseSubmodules settings
@ 2024-11-27 14:17 Henrik Ahlm
  0 siblings, 0 replies; only message in thread
From: Henrik Ahlm @ 2024-11-27 14:17 UTC (permalink / raw)
  To: git

What did you do before the bug happened? (Steps to reproduce your issue)
Setting configs in this order will result in fetch on-demand and push
check not being respected:
git config --global fetch.recurseSubmodules on-demand
git config --global push.recurseSubmodules check
git config --global submodule.recurse true

It can be seen if you have a repo with at least one submodule. Just
call pull on a repo with no updated submodule(s) commits, and it will
still fetch from the submodule(s). Similar approach to push with
check.


What did you expect to happen? (Expected behavior)
I expected the explicit fetch/push settings to be respected, instead
of having them receive the default value from submodule.recurse.

If submodule.recurse is set before the fetch/push settings, it works
as expected.


What happened instead? (Actual behavior)
The default values were used instead of the configured setting for fetch/push.


Anything else you want to add:
The order of these settings shouldn't matter, and if
push/fetch.recurseSubmodules have received a setting, it should not
pick up a "stale" default value.

This has been tested on Ubuntu 24.04 using:
Git version 2.43.0
Git build from source from the next branch


Thank you
Henrik

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-27 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 14:17 Bug: git config order affects outcome for recurseSubmodules settings Henrik Ahlm

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