summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 617344d)
raw | patch | inline | side by side (parent: 617344d)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Fri, 13 Aug 2010 20:40:04 +0000 (20:40 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Aug 2010 19:43:23 +0000 (12:43 -0700) |
Change the five tests that were all checking "git config --bool
core.filemode" to use a new FILEMODE prerequisite in
lib-prereq-FILEMODE.sh.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
core.filemode" to use a new FILEMODE prerequisite in
lib-prereq-FILEMODE.sh.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-prereq-FILEMODE.sh | [new file with mode: 0644] | patch | blob |
t/t3701-add-interactive.sh | patch | blob | history | |
t/t4102-apply-rename.sh | patch | blob | history | |
t/t4129-apply-samemode.sh | patch | blob | history | |
t/t6031-merge-recursive.sh | patch | blob | history | |
t/t9200-git-cvsexportcommit.sh | patch | blob | history |
diff --git a/t/lib-prereq-FILEMODE.sh b/t/lib-prereq-FILEMODE.sh
--- /dev/null
+++ b/t/lib-prereq-FILEMODE.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+if test "$(git config --bool core.filemode)" = false
+then
+ say 'filemode disabled on the filesystem'
+else
+ test_set_prereq FILEMODE
+fi
index 7ad8465f8f89656bf0ce57feb45e12bc9cea5d65..75ec90bdea26094f69f5f2e4dda74c3c6c258173 100755 (executable)
test_description='add -i basic tests'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL; then
skip_all='skipping git add -i tests, perl not available'
'
rm -f .gitignore
-if test "$(git config --bool core.filemode)" = false
-then
- say '# skipping filemode tests (filesystem does not properly support modes)'
-else
- test_set_prereq FILEMODE
-fi
-
test_expect_success FILEMODE 'patch does not affect mode' '
git reset --hard &&
echo content >>file &&
index 1597965241c3566aa3a14e986fd5a630fb348479..e3ea3d5114b8f6a09b79c9a1323c563da0c7b170 100755 (executable)
--- a/t/t4102-apply-rename.sh
+++ b/t/t4102-apply-rename.sh
'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
# setup
test_expect_success apply \
'git apply --index --stat --summary --apply test-patch'
-if test "$(git config --bool core.filemode)" = false
-then
- say 'filemode disabled on the filesystem'
-else
- test_set_prereq FILEMODE
-fi
-
test_expect_success FILEMODE validate \
'test -f bar && ls -l bar | grep "^-..x......"'
index fc7af0493102f12438d59ac5ed6e3e96eda8c841..0d36ebdc8653d7d22ab5831c1f154db452e4558e 100755 (executable)
test_description='applying patch with mode bits'
. ./test-lib.sh
-
-if test "$(git config --bool core.filemode)" = false
-then
- say 'filemode disabled on the filesystem'
-else
- test_set_prereq FILEMODE
-fi
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
echo original >file &&
index 8a3304fb0b5901fb02435d3b77c3d049404f4e25..66167e3f732422146d3540c7951a424526c26cfc 100755 (executable)
test_description='merge-recursive: handle file mode'
. ./test-lib.sh
-
-if ! test "$(git config --bool core.filemode)" = false
-then
- test_set_prereq FILEMODE
-fi
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success 'mode change in one branch: keep changed version' '
: >file1 &&
index ee39b36d78a9d5602be5d48ae34b1e5ce4927c79..e5da65b99fa1459836e516772fe8d13d038f502e 100755 (executable)
test_description='Test export of commits to CVS'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL; then
skip_all='skipping git cvsexportcommit tests, perl not available'
test_must_fail git cvsexportcommit -c $id
)'
-if ! test "$(git config --bool core.filemode)" = false
-then
- test_set_prereq FILEMODE
-fi
-
test_expect_success FILEMODE \
'Retain execute bit' \
'mkdir G &&