Merge branch 'tq/git-ssh-command'
[gitweb.git] / t / t4124-apply-ws-rule.sh
index 0bbcf0603d20380e71ef27cec654ec6c604561d1..c6474de4c8c30eba9b5375f6c4e176e67c1fd001 100755 (executable)
@@ -47,7 +47,7 @@ test_fix () {
        # find touched lines
        $DIFF file target | sed -n -e "s/^> //p" >fixed
 
-       # the changed lines are all expeced to change
+       # the changed lines are all expected to change
        fixed_cnt=$(wc -l <fixed)
        case "$1" in
        '') expect_cnt=$fixed_cnt ;;
@@ -512,4 +512,15 @@ test_expect_success 'whitespace=fix to expand' '
        git -c core.whitespace=tab-in-indent apply --whitespace=fix patch
 '
 
+test_expect_success 'whitespace check skipped for excluded paths' '
+       git config core.whitespace blank-at-eol &&
+       >used &&
+       >unused &&
+       git add used unused &&
+       echo "used" >used &&
+       echo "unused " >unused &&
+       git diff-files -p used unused >patch &&
+       git apply --include=used --stat --whitespace=error <patch
+'
+
 test_done