Fix submodule always building from HEAD instead of recorded commit#415
Merged
chrisbra merged 2 commits intovim:masterfrom Mar 22, 2026
Merged
Fix submodule always building from HEAD instead of recorded commit#415chrisbra merged 2 commits intovim:masterfrom
chrisbra merged 2 commits intovim:masterfrom
Conversation
Remove `git submodule update --remote` which overwrites the submodule checkout with the latest remote HEAD, ignoring the commit recorded in the superproject. I noticed that builds produced by CI did not match the tagged version. The root cause turned out to be that after `git submodule update --init --depth 20` correctly checks out the commit pinned by the superproject, the subsequent `git submodule update --remote` immediately overwrites it with whatever is at the tip of the remote tracking branch. This means every build was effectively building from vim HEAD rather than the version the tag intended to release.
Member
Author
|
How I found this: |
Member
|
Thanks. I have noticed this a few times, but was not sure what caused this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that builds produced by CI did not match the tagged version. The root cause turned out to be that after
git submodule update --init --depth 20correctly checks out the commit pinned by the superproject, the subsequentgit submodule update --remoteimmediately overwrites it with whatever is at the tip of the remote tracking branch. This means every build was effectively building from vim HEAD rather than the version the tag intended to release.This commit removes the
git submodule update --remoteline so that the submodule stays at the exact commit the superproject records.