зеркало из https://github.com/microsoft/git.git
t4120-apply-popt: help systems with core.filemode=false
A test case verifies that filemode-only patches work as expected. Help systems where "test -x" does not work by applying the test patch also to the index, where the effects can be verified even on such systems. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
899663f8e4
Коммит
97a853d34b
|
@ -6,6 +6,7 @@
|
||||||
test_description='git apply -p handling.'
|
test_description='git apply -p handling.'
|
||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
mkdir sub &&
|
mkdir sub &&
|
||||||
|
@ -62,8 +63,12 @@ test_expect_success 'apply (-p2) diff, mode change only' '
|
||||||
old mode 100644
|
old mode 100644
|
||||||
new mode 100755
|
new mode 100755
|
||||||
EOF
|
EOF
|
||||||
chmod 644 file1 &&
|
test_chmod -x file1 &&
|
||||||
git apply -p2 patch.chmod &&
|
git apply --index -p2 patch.chmod &&
|
||||||
|
case $(git ls-files -s file1) in 100755*) : good;; *) false;; esac
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success FILEMODE 'file mode was changed' '
|
||||||
test -x file1
|
test -x file1
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче