From 3b90861aa48ac060f1b32ba592fd4501b31c6a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Mon, 3 Jul 2017 20:40:17 +0200 Subject: [PATCH] Fix detection of dirty working copy with git --- cmake/DVCS.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/DVCS.cmake b/cmake/DVCS.cmake index 37ec604..11b40c8 100644 --- a/cmake/DVCS.cmake +++ b/cmake/DVCS.cmake @@ -93,8 +93,8 @@ MACRO(GET_DVCS_INFO) DVCS_CALL("revision" "-" id -i) ELSEIF(GIT_FOUND) DVCS_CALL("revision" "-" rev-parse --verify --short HEAD) - DVCS_EXECUTE(dvcs_dirty_wc diff --shortstat) - IF(DEFINED dvcs_dirty_wc) + DVCS_EXECUTE(dvcs_clean_wc diff-index --quiet HEAD) + IF(NOT DEFINED dvcs_clean_wc) MESSAGE(STATUS "DVCS: dirty working copy") SET(dvcs_revision ${dvcs_revision}+) SET(VERSION_DVCS ${VERSION_DVCS}+)