From 09766d199633adec7410ac252fb429a1919ab04b Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Fri, 23 May 2025 15:34:29 +0200 Subject: [PATCH] Fix: Don't update submodules that we shouldn't checkout There were a logic error in make update where we would fetch data from submodules when not referenced in our local git config. Fixes part of #139328. Pull Request: https://projects.blender.org/blender/blender/pulls/139350 --- build_files/utils/make_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_files/utils/make_utils.py b/build_files/utils/make_utils.py index d02dfdefc30..56754483c74 100755 --- a/build_files/utils/make_utils.py +++ b/build_files/utils/make_utils.py @@ -215,7 +215,11 @@ def is_git_submodule_enabled(git_command: str, submodule_dir: Path) -> bool: update = check_output( (git_command, "config", "--local", _git_submodule_config_key(submodule_dir, "update")), exit_on_error=False) - + if update == "": + # The repo is not in our local config. Check the default .gitmodules setting. + update = check_output( + (git_command, "config", "--file", str(gitmodules), _git_submodule_config_key(submodule_dir, "update")), + exit_on_error=False) return update.lower() != "none"