From b41918459103179532243720f51907fe31a0c465 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 22 Mar 2023 15:23:44 -0700 Subject: [PATCH] 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. --- cmake/Modules/GitUtilities.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/GitUtilities.cmake b/cmake/Modules/GitUtilities.cmake index 586c7b433..dbd3a31e9 100644 --- a/cmake/Modules/GitUtilities.cmake +++ b/cmake/Modules/GitUtilities.cmake @@ -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.