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
31 jobs for !6109 with ep-update-git-hash-missing in 70 minutes and 46 seconds (queued for 2 seconds)
latest detached
Status Name Job ID Coverage
  Build
passed build:centos6-x86_64 #5773775
cmake build docker linux manual

00:04:09

passed build:debian10-iwyu #5773772
cmake build docker linux

00:04:33

passed build:fedora33-ninja #5773776
cmake build docker linux linux-3.17 manual

00:02:01

passed build:fedora33-sphinx #5773774
cmake build docker linux linux-3.17

00:04:28

passed build:fedora33-tidy #5773773
cmake build docker linux linux-3.17

00:06:27

passed build:macos-x86_64-makefiles #5773778
cmake macos shell xcode-12.4 nonconcurrent manual

00:03:04

passed build:macos-x86_64-ninja #5773777
cmake macos shell xcode-12.4 nonconcurrent manual

00:03:00

passed build:windows-vs2019-x64-ninja #5773779
cmake windows shell vs2019 msvc-19.28-16.9 nonconcurrent manual

00:05:32

 
  Test
passed test:fedora33-ninja #5773780
cmake docker linux linux-3.17 x11

00:04:52

passed test:macos-x86_64-makefiles #5773782
cmake macos shell xcode-12.4 nonconcurrent

00:10:26

passed test:macos-x86_64-ninja #5773781
cmake macos shell xcode-12.4 nonconcurrent

00:14:12

passed test:windows-vs2019-x64-ninja #5773783
cmake windows shell vs2019 msvc-19.28-16.9 nonconcurrent

00:20:10

 
  Test Ext
failed test:cuda10.2-nvidia #5773786
cmake cuda-rt docker linux

01:00:09

passed test:debian10-ninja #5773784
cmake build docker linux linux-3.17

00:04:57

passed test:fedora33-makefiles #5773785
cmake build docker linux linux-3.17

00:06:43

passed test:fedora33-ninja-multi #5773787
cmake build docker linux linux-3.17

00:02:22

passed test:macos-x86_64-xcode #5773788
cmake macos shell xcode-12.4 concurrent

00:43:23

passed test:windows-vs2019-x64 #5773789
cmake windows shell vs2019 msvc-19.28-16.9 concurrent

00:24:38

 
  External
passed cdash

passed ghostflow-check-master

passed ghostflow-check-release

passed ghostflow-stager

passed cdash

passed cdash

passed cdash

passed cdash

passed cdash

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

 
Name Stage Failure
failed
test:cuda10.2-nvidia Test Ext The script exceeded the maximum execution time set for the job
***** WAITING, System Load: 9, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 9, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 8, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 8, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 8, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 8, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 8, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
***** WAITING, System Load: 9, Max Allowed Load: 8, Smallest test RunCMake.NinjaMultiConfig requires 1*****
ERROR: Job failed: execution took longer than 1h0m0s seconds