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
This commit is contained in:
committed by
Brecht Van Lommel
parent
6b1ef63f4d
commit
09766d1996
@@ -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"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user