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

Bug: git config order affects outcome for recurseSubmodules settings

From
HAHenrik Ahlm <henrik.ahlm@gmail.com>
Date
Nov 27, 2024, 14:17 UTC
Message-ID
<CABJpytygYtdAT7z1V44h12sLzzo5Ozf3Vc-=fE7XBQnP1G6HSg@mail.gmail.com>

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

Message 1 of 1 in “Bug: git config order affects outcome for recurseSubmodules settings”
  1. Henrik AhlmNov 27, 2024

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.