cmake/Comptime.cmake: exclude remote refs HEAD from current branch search

remotes/origin/HEAD is valid, exists in my repo and I do
not know why but it makes checking out origin/master show
up as HEAD in game so KILL.
This commit is contained in:
James R 2023-03-22 15:23:44 -07:00
parent 312e847151
commit b419184591

View file

@ -26,7 +26,7 @@ function(git_current_branch variable)
# If a detached head, a ref could still be resolved.
if("${output}" STREQUAL "")
_git_command(describe --all --exact-match)
_git_command(describe --all --exact-match --exclude */HEAD)
# Get the ref, in the form heads/master or
# remotes/origin/master so isolate the final part.