Mend git merge history for SPIRV-Headers and SPIRV-Tools
https://swiftshader-review.googlesource.com/c/SwiftShader/+/50749
squashed together the changes from two `git subtree pull` commands (for
SPIRV-Headers and SPIRV-Tools), which resulted in a change with a single
parent.
`git subtree` expects a merge commit with a single set of `git-subtree-*`
metadata tags. The squash resulted in a change description with two sets
of these, confusing `git subtree` even further.
The process to fix this is probably not the easiest, but the first one I found that works:
# Rollback to the parent change of 50749
git checkout 43bb60e1
# Perform the subtree pull again for SPIRV-Headers (to 104ecc356)
git subtree pull --prefix third_party/SPIRV-Headers https://github.com/KhronosGroup/SPIRV-Headers 104ecc356c1bea4476320faca64440cd1df655a3 --squash -m "Update SPIR-V Headers"
# Note the second parent of the merge for the SPIRV-Headers (Merge: 43bb60e1 ded361b4)
git show -1
# Perform the subtree pull again for SPIRV-Tools (to b0e22d28f)
git subtree pull --prefix third_party/SPIRV-Tools https://github.com/KhronosGroup/SPIRV-Tools b0e22d28f5ec891d6b256703575d08fce4228bd9 --squash -m "Update SPIR-V Tools"
# Note the second parent of the merge for the SPIRV-Tools (Merge: a00ce432a9d bdb9eea9)
git show -1
# Jump back to master
git checkout origin/master
# Revert 50749
git revert 9dff6a3b
# Re-merge the squashed update change for SPIRV-Headers ** this change **
git merge -Xsubtree="third_party/SPIRV-Headers" ded361b4
# Re-merge the squashed update change for SPIRV-Tools
git merge -Xsubtree="third_party/SPIRV-Tools" bdb9eea9
Bug: b/174239232
Change-Id: Ibab851eb610b1448193f57a628eb95bdb58057ee
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment