Build fails at googletest stage

The build is currently failing at googletest stage:

[426%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest'...
fatal: invalid reference: master
CMake Error at /mnt/disk_one/haf/build/googletest/tmp/googletest-gitclone.cmake:40 (message):
  Failed to checkout tag: 'master'


make[2]: *** [tests/unit/CMakeFiles/googletest-download.dir/build.make:62: googletest/src/googletest-stamp/googletest-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:5355: tests/unit/CMakeFiles/googletest-download.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

This is because the repo https://github.com/google/googletest has no master branch, but main branch instead.

I manually replaced references to master with main and the build continued successfully, for example by editing the Make files locally:

nano /mnt/disk_one/haf/build/googletest/tmp/googletest-gitclone.cmake
nano /mnt/disk_one/haf/build/googletest/tmp/googletest-gitupdate.cmake