diff --git a/CMakeLists.txt b/CMakeLists.txt index c9006668b2..bc8abe9bb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,7 +185,7 @@ if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") endif() else() set(GIT_SHA 0) - set(GIT_MOD 0) + set(GIT_MOD 1) endif() string(REGEX REPLACE "[^0-9a-fA-F]+" "" GIT_SHA "${GIT_SHA}") string(REGEX REPLACE "[^0-9: /-]+" "" GIT_DATE "${GIT_DATE}") diff --git a/Makefile b/Makefile index fbb2f60342..3a15364c30 100644 --- a/Makefile +++ b/Makefile @@ -853,7 +853,7 @@ ifdef FORCE_GIT_SHA git_date := $(build_date) else git_sha := $(shell git rev-parse HEAD 2>/dev/null) - git_tag := $(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match 2>/dev/null) + git_tag := $(shell git symbolic-ref -q --short HEAD 2> /dev/null || git describe --tags --exact-match 2>/dev/null) git_mod := $(shell git diff-index HEAD --quiet 2>/dev/null; echo $$?) git_date := $(shell git log -1 --date=format:"%Y-%m-%d %T" --format="%ad" 2>/dev/null) endif