9277377f6b
Solves the issue of the script potentially sitting for a long time without having any progress reported. Confusingly, such behavior depends on Git version. In older versions (< 2.33) there will be progress reported, but it then got changed by the commit in Git: https://github.com/git/git/commit/7a132c628e57b9bceeb88832ea051395c0637b16 The delayed checkout is exactly how Git LFS integrates into the Git process. Another affecting factor for the behavior is that submodule configured to use "checkout" update policy is forced to have quite flag passed to the "git checkout": https://github.com/git/git/blob/v2.43.2/builtin/submodule--helper.c#L2258 This is done to avoid the long message at the end of checkout about the detached state of HEAD, with instructions how to resolve that. There are two possible solutions: either use "rebase" update policy for submodules, or skip Git LFS download during the submodule update. Changing the update policy is possible, but it needs to be done with a bit of care, and possible revised process for updating/merging tests data. This change follows the second idea of delaying LFS download for a later step, so the process is the following: - Run `git submodule update`, but tell Git LFS to not resolve the links by using GIT_LFS_SKIP_SMUDGE=1 environment variable. - Run `git lfs pull` for the submodule, to resolve the links. Doing so bypasses hardcoded silencing in the Git. It also potentially allows to recover from an aborted download process. The `git lfs pull` seems to be a nominal step to resolve the LFS links after the smudging has been skipped. It is also how in earlier Git versions some Windows limitations were bypassed: https://www.mankier.com/7/git-lfs-faq The submodule update now also receives the "--progress" flag, which logs the initial Git repository checkout process, which further improves the feedback. The byproduct of this change is that an error during precompiled libraries and tests data update is not considered to be fatal. It seems to be more fitting with other update steps, and allows more easily reuse some code. There is also a cosmetic change: the messages at the end of the update process now have their own header, allowing more easily see them in the wall-of-text. Pull Request: https://projects.blender.org/blender/blender/pulls/118673