summaryrefslogtreecommitdiff
path: root/t/t4119-apply-config.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-09 19:53:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-09 19:53:58 (GMT)
commitead51a75d5ca432daa7429b70d363dba0cdf6507 (patch)
tree852b67645fe3e0b97daa72634dc9ab18533fb631 /t/t4119-apply-config.sh
parent93424a0fd882a3ed1c1f7a8b6fe71fdaa21cce99 (diff)
parent477a08af04c227064860ce99197c501037f7f39c (diff)
downloadgit-ead51a75d5ca432daa7429b70d363dba0cdf6507.zip
git-ead51a75d5ca432daa7429b70d363dba0cdf6507.tar.gz
git-ead51a75d5ca432daa7429b70d363dba0cdf6507.tar.bz2
Merge branch 'jc/apply-ws-prefix'
Applying a patch not generated by Git in a subdirectory used to check the whitespace breakage using the attributes for incorrect paths. Also whitespace checks were performed even for paths excluded via "git apply --exclude=<path>" mechanism. * jc/apply-ws-prefix: apply: omit ws check for excluded paths apply: hoist use_patch() helper for path exclusion up apply: use the right attribute for paths in non-Git patches
Diffstat (limited to 't/t4119-apply-config.sh')
-rwxr-xr-xt/t4119-apply-config.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t4119-apply-config.sh b/t/t4119-apply-config.sh
index c393be6..a9a0583 100755
--- a/t/t4119-apply-config.sh
+++ b/t/t4119-apply-config.sh
@@ -159,4 +159,21 @@ test_expect_success 'same but with traditional patch input of depth 2' '
check_result sub/file1
'
+test_expect_success 'in subdir with traditional patch input' '
+ cd "$D" &&
+ git config apply.whitespace strip &&
+ cat >.gitattributes <<-EOF &&
+ /* whitespace=blank-at-eol
+ sub/* whitespace=-blank-at-eol
+ EOF
+ rm -f sub/file1 &&
+ cp saved sub/file1 &&
+ git update-index --refresh &&
+
+ cd sub &&
+ git apply ../gpatch.file &&
+ echo "B " >expect &&
+ test_cmp expect file1
+'
+
test_done