diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-10-17 10:16:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-28 14:32:35 (GMT) |
commit | ac6a4d488446cb1e906c4b55fd055547dacd55c4 (patch) | |
tree | aaa082df07f18a01a53efbbc0ecb37efba25ada5 /Tests/ExternalProjectUpdate | |
parent | 17c4c8b92b63b8ce920dd7db38bab4a772990cce (diff) | |
download | CMake-ac6a4d488446cb1e906c4b55fd055547dacd55c4.zip CMake-ac6a4d488446cb1e906c4b55fd055547dacd55c4.tar.gz CMake-ac6a4d488446cb1e906c4b55fd055547dacd55c4.tar.bz2 |
ExternalProject: Improve robustness of update step
Refactor the update logic to make it easier to follow. The following
fixes/improvements are some consequences of this change:
* Absorb a confusing git checkout failure message when the failure
is allowed and we act on that failure appropriately.
* Fix an unnecessary fetch in some scenarios when checking out a
git hash we already have locally.
* Stash and restore any local changes even when not rebasing.
* Avoid unsafe rebasing where we are not on a branch that is
already tracking the requested branch.
* When fetching, use --tags --force to ensure we get all the tags
and commits leading up to them regardless of whether the tags
are on branches or not. Also update our local tags if they move
on the remote.
Fixes: #20677
Diffstat (limited to 'Tests/ExternalProjectUpdate')
-rw-r--r-- | Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index aaa05d7..394df87 100644 --- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake +++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -185,7 +185,6 @@ if(do_git_tests) # 'git fetch' check_a_tag(tag1 d1970730310fe8bc07e73f15dc570071f9f9654a 0 REBASE) check_a_tag(tag2 5842b503ba4113976d9bb28d57b5aee1ad2736b7 1 REBASE) - check_a_tag(d19707303 d1970730310fe8bc07e73f15dc570071f9f9654a 1 REBASE) check_a_tag(d19707303 d1970730310fe8bc07e73f15dc570071f9f9654a 0 REBASE) check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 REBASE) # This is a remote symbolic ref, so it will always trigger a 'git fetch' |