summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 899663f)
raw | patch | inline | side by side (parent: 899663f)
author | Johannes Sixt <j6t@kdbg.org> | |
Thu, 3 Feb 2011 15:31:43 +0000 (15:31 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Feb 2011 22:27:25 +0000 (14:27 -0800) |
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>
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>
t/t4120-apply-popt.sh | patch | blob | history |
diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh
index 579c9e61054521301464bfc31351040d45966836..a33d510bf6b27a6bb2c640cfc9d11f462cbdf7a6 100755 (executable)
--- a/t/t4120-apply-popt.sh
+++ b/t/t4120-apply-popt.sh
test_description='git apply -p handling.'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
mkdir sub &&
old mode 100644
new mode 100755
EOF
- chmod 644 file1 &&
- git apply -p2 patch.chmod &&
+ test_chmod -x file1 &&
+ 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
'