-
- Downloads
ExternalProject: Ensure git fetch if updating to hash we don't have yet
In ac6a4d48 (ExternalProject: Improve robustness of update step, 2020-10-17), the method used to check whether we already have a commit or not was changed from using git rev-list to git rev-parse. The new logic assumed rev-parse would output nothing if given a commit hash it didn't know about, but it simply prints the hash again without raising an error in this scenario. Amend that logic by adding ^{commit} to the ref to ensure we do get an error if that ref is not currently known. Fixes: #22166
Showing
- Modules/ExternalProject-gitupdate.cmake.in 1 addition, 1 deletionModules/ExternalProject-gitupdate.cmake.in
- Tests/RunCMake/ExternalProject/FetchGitRefs.cmake 19 additions, 2 deletionsTests/RunCMake/ExternalProject/FetchGitRefs.cmake
- Tests/RunCMake/ExternalProject/FetchGitRefs/CMakeLists.txt 0 additions, 0 deletionsTests/RunCMake/ExternalProject/FetchGitRefs/CMakeLists.txt
- Tests/RunCMake/ExternalProject/RunCMakeTest.cmake 1 addition, 1 deletionTests/RunCMake/ExternalProject/RunCMakeTest.cmake
File moved
Please register or sign in to comment