{"thread":{"id":"62552","subject":"Bug: git config order affects outcome for recurseSubmodules settings","startedAt":"2024-11-27T14:17:55Z","lastAt":"2024-11-27T14:17:55Z","messageCount":1,"participants":["Henrik Ahlm"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"508228","messageId":"CABJpytygYtdAT7z1V44h12sLzzo5Ozf3Vc-=fE7XBQnP1G6HSg@mail.gmail.com","threadId":"62552","inReplyTo":null,"subject":"Bug: git config order affects outcome for recurseSubmodules settings","fromName":"Henrik Ahlm","fromEmail":"henrik.ahlm@gmail.com","sentAt":"2024-11-27T14:17:42Z","receivedAt":"2024-11-27T14:17:55Z","isPatch":false,"sender":{"key":"henrik.ahlm@gmail.com","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\nSetting configs in this order will result in fetch on-demand and push\ncheck not being respected:\ngit config --global fetch.recurseSubmodules on-demand\ngit config --global push.recurseSubmodules check\ngit config --global submodule.recurse true\n\nIt can be seen if you have a repo with at least one submodule. Just\ncall pull on a repo with no updated submodule(s) commits, and it will\nstill fetch from the submodule(s). Similar approach to push with\ncheck.\n\n\nWhat did you expect to happen? (Expected behavior)\nI expected the explicit fetch/push settings to be respected, instead\nof having them receive the default value from submodule.recurse.\n\nIf submodule.recurse is set before the fetch/push settings, it works\nas expected.\n\n\nWhat happened instead? (Actual behavior)\nThe default values were used instead of the configured setting for fetch/push.\n\n\nAnything else you want to add:\nThe order of these settings shouldn't matter, and if\npush/fetch.recurseSubmodules have received a setting, it should not\npick up a \"stale\" default value.\n\nThis has been tested on Ubuntu 24.04 using:\nGit version 2.43.0\nGit build from source from the next branch\n\n\nThank you\nHenrik\n"}]}