From: Henrik Ahlm <henrik.ahlm@gmail.com>
To: git@vger.kernel.org
Subject: Bug: git config order affects outcome for recurseSubmodules settings
Date: Wed, 27 Nov 2024 15:17:42 +0100 [thread overview]
Message-ID: <CABJpytygYtdAT7z1V44h12sLzzo5Ozf3Vc-=fE7XBQnP1G6HSg@mail.gmail.com> (raw)
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
reply other threads:[~2024-11-27 14:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABJpytygYtdAT7z1V44h12sLzzo5Ozf3Vc-=fE7XBQnP1G6HSg@mail.gmail.com' \
--to=henrik.ahlm@gmail.com \
--cc=git@vger.kernel.org \
/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.
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).