File tree Expand file tree Collapse file tree 6 files changed +16
-31
lines changed
Expand file tree Collapse file tree 6 files changed +16
-31
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ # Copyright (c) 2010 Ævar Arnfjörð Bjarmason
4+ #
5+
6+ if test " $( git config --bool core.filemode) " = false
7+ then
8+ say ' filemode disabled on the filesystem'
9+ else
10+ test_set_prereq FILEMODE
11+ fi
Original file line number Diff line number Diff line change 22
33test_description=' add -i basic tests'
44. ./test-lib.sh
5+ . " $TEST_DIRECTORY " /lib-prereq-FILEMODE.sh
56
67if ! test_have_prereq PERL; then
78 skip_all=' skipping git add -i tests, perl not available'
@@ -152,13 +153,6 @@ test_expect_success 'skip files similarly as commit -a' '
152153'
153154rm -f .gitignore
154155
155- if test " $( git config --bool core.filemode) " = false
156- then
157- say ' # skipping filemode tests (filesystem does not properly support modes)'
158- else
159- test_set_prereq FILEMODE
160- fi
161-
162156test_expect_success FILEMODE ' patch does not affect mode' '
163157 git reset --hard &&
164158 echo content >>file &&
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ test_description='git apply handling copy/rename patch.
77
88'
99. ./test-lib.sh
10+ . " $TEST_DIRECTORY " /lib-prereq-FILEMODE.sh
1011
1112# setup
1213
@@ -31,13 +32,6 @@ test_expect_success setup \
3132test_expect_success apply \
3233 ' git apply --index --stat --summary --apply test-patch'
3334
34- if test " $( git config --bool core.filemode) " = false
35- then
36- say ' filemode disabled on the filesystem'
37- else
38- test_set_prereq FILEMODE
39- fi
40-
4135test_expect_success FILEMODE validate \
4236 ' test -f bar && ls -l bar | grep "^-..x......"'
4337
Original file line number Diff line number Diff line change 33test_description=' applying patch with mode bits'
44
55. ./test-lib.sh
6-
7- if test " $( git config --bool core.filemode) " = false
8- then
9- say ' filemode disabled on the filesystem'
10- else
11- test_set_prereq FILEMODE
12- fi
6+ . " $TEST_DIRECTORY " /lib-prereq-FILEMODE.sh
137
148test_expect_success setup '
159 echo original >file &&
Original file line number Diff line number Diff line change 22
33test_description=' merge-recursive: handle file mode'
44. ./test-lib.sh
5-
6- if ! test " $( git config --bool core.filemode) " = false
7- then
8- test_set_prereq FILEMODE
9- fi
5+ . " $TEST_DIRECTORY " /lib-prereq-FILEMODE.sh
106
117test_expect_success ' mode change in one branch: keep changed version' '
128 : >file1 &&
Original file line number Diff line number Diff line change 55test_description=' Test export of commits to CVS'
66
77. ./test-lib.sh
8+ . " $TEST_DIRECTORY " /lib-prereq-FILEMODE.sh
89
910if ! test_have_prereq PERL; then
1011 skip_all=' skipping git cvsexportcommit tests, perl not available'
@@ -229,11 +230,6 @@ test_expect_success \
229230 test_must_fail git cvsexportcommit -c $id
230231 )'
231232
232- if ! test " $( git config --bool core.filemode) " = false
233- then
234- test_set_prereq FILEMODE
235- fi
236-
237233test_expect_success FILEMODE \
238234 ' Retain execute bit' \
239235 ' mkdir G &&
You can’t perform that action at this time.
0 commit comments