aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristiano A. Silva <hudokkow@gmail.com>2017-01-23 08:47:14 +0000
committerGitHub <noreply@github.com>2017-01-23 08:47:14 +0000
commitac1c57946647b2ac087abc27591a819b76ecf33c (patch)
treeca999d3098c6718c905d94a9e71ffdc1df5c88de
parent918e7e947a928dcee4dd8c92b65443da562cff87 (diff)
parentd3f39c1b2ce9b6459563cf704f12e4d7259f89ab (diff)
Merge pull request #11528 from Rechi/fixCmakeGitRevKrypton
[backport][cmake] git update-index --refresh must be called before using it
-rw-r--r--project/cmake/scripts/common/Macros.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/project/cmake/scripts/common/Macros.cmake b/project/cmake/scripts/common/Macros.cmake
index 6b5a2f1a7e..d8cdce9ce2 100644
--- a/project/cmake/scripts/common/Macros.cmake
+++ b/project/cmake/scripts/common/Macros.cmake
@@ -584,6 +584,7 @@ function(core_find_git_rev stamp)
else()
find_package(Git)
if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git)
+ execute_process(COMMAND ${GIT_EXECUTABLE} update-index --ignore-submodules --refresh -q)
execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet --
RESULT_VARIABLE status_code
WORKING_DIRECTORY ${CORE_SOURCE_DIR})