Просмотр исходного кода

Make CTest.UpdateGIT robust to user git config

Part of this test does "git pull" on a dirty work tree.  We need to make
sure that 'branch.master.rebase' is false for the test repository.
Otherwise if it is true in the user configuration then pull will refuse
to rebase and the test will fail.
Brad King 16 лет назад
Родитель
Сommit
06332c883f
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      Tests/CTestUpdateGIT.cmake.in

+ 7 - 0
Tests/CTestUpdateGIT.cmake.in

@@ -135,6 +135,13 @@ run_child(
   COMMAND ${GIT} reset --hard master~2
   )
 
+# Make sure pull does not try to rebase (which does not work with
+# modified files) even if ~/.gitconfig sets "branch.master.rebase".
+run_child(
+  WORKING_DIRECTORY ${TOP}/user-source
+  COMMAND ${GIT} config branch.master.rebase false
+  )
+
 # Create a modified file.
 modify_content(user-source)