]> git.sesse.net Git - stockfish/commitdiff
Set the length of GIT_SHA to 8 characters
authorTorom <torsten.hellwig93@gmail.com>
Thu, 13 Apr 2023 19:55:13 +0000 (21:55 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 22 Apr 2023 08:38:25 +0000 (10:38 +0200)
Previously, the length of git commit hashes could vary depending on the git environment.

closes https://github.com/official-stockfish/Stockfish/pull/4527

No functional change

src/Makefile

index abcf11b0a1158ae73d26ff36af64ce7c5c63272c..82664618bb75e22ee5ddabe0718c46ac54488a97 100644 (file)
@@ -702,7 +702,7 @@ ifeq ($(pext),yes)
 endif
 
 ### 3.7.1 Try to include git commit sha for versioning
-GIT_SHA = $(shell git rev-parse --short HEAD 2>/dev/null)
+GIT_SHA = $(shell git rev-parse HEAD 2>/dev/null | cut -c 1-8)
 ifneq ($(GIT_SHA), )
        CXXFLAGS += -DGIT_SHA=$(GIT_SHA)
 endif