summaryrefslogtreecommitdiff
path: root/Tests/CTestUpdateGIT.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-06-20 10:14:23 -0400
committerBrad King <brad.king@kitware.com>2012-06-20 10:19:44 -0400
commit5c153c62f3780bdc4976a9d25e6b0c217170558e (patch)
tree732e7daea0f25bc7a1ef22cbe05f80aa813b28bd /Tests/CTestUpdateGIT.cmake.in
parent30305b989e944d0b5bdff16ba408d636a8c81e91 (diff)
downloadcmake-5c153c62f3780bdc4976a9d25e6b0c217170558e.tar.gz
Make CTest.UpdateGIT robust to Git safecrlf on Windows
If the user has configured 'core.autocrlf' and 'core.safecrlf' then 'git submodule add' will fail to 'git add' the '.gitmodules' file because it has LF newlines, at least as of Git 1.7.11. Disable 'core.safecrlf' in our test repository to avoid the problem.
Diffstat (limited to 'Tests/CTestUpdateGIT.cmake.in')
-rw-r--r--Tests/CTestUpdateGIT.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index 793b9870da..eb9f987c6a 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -91,6 +91,9 @@ run_child(WORKING_DIRECTORY ${TOP}/import
COMMAND ${GIT} add .
)
run_child(WORKING_DIRECTORY ${TOP}/import
+ COMMAND ${GIT} config core.safecrlf false
+ )
+run_child(WORKING_DIRECTORY ${TOP}/import
COMMAND ${GIT} submodule add ${MOD_REPO} module
)
run_child(WORKING_DIRECTORY ${TOP}/import