diff options
author | Johannes Sixt <j6t@kdbg.org> | 2011-02-03 15:31:43 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-07 14:27:25 -0800 |
commit | 97a853d34baef41f6d235ba49bf390d063fbd9df (patch) | |
tree | c0e51dda6f9caf8b0fef570cb1e94fcb77eea756 /t/t4120-apply-popt.sh | |
parent | 899663f8e452caf158d98d558a41f9b04042b18f (diff) | |
download | git-97a853d34baef41f6d235ba49bf390d063fbd9df.tar.gz |
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>
Diffstat (limited to 't/t4120-apply-popt.sh')
-rwxr-xr-x | t/t4120-apply-popt.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh index 579c9e6105..a33d510bf6 100755 --- a/t/t4120-apply-popt.sh +++ b/t/t4120-apply-popt.sh @@ -6,6 +6,7 @@ test_description='git apply -p handling.' . ./test-lib.sh +. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh test_expect_success setup ' mkdir sub && @@ -62,8 +63,12 @@ test_expect_success 'apply (-p2) diff, mode change only' ' 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 ' |