summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eac70c4)
raw | patch | inline | side by side (parent: eac70c4)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Feb 2007 09:14:22 +0000 (01:14 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Feb 2007 09:14:22 +0000 (01:14 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/t4119-apply-config.sh | patch | blob | history |
index 816b5b8fb2388e59d99532f49a5c46f81dfc8125..f9b94251530fb2b7913af7a1aaf9b5fbbeb78cd3 100755 (executable)
--- a/t/t4119-apply-config.sh
+++ b/t/t4119-apply-config.sh
git diff >patch.file
'
+# Also handcraft GNU diff output; note this has trailing whitespace.
+cat >gpatch.file <<\EOF
+--- file1 2007-02-21 01:04:24.000000000 -0800
++++ file1+ 2007-02-21 01:07:44.000000000 -0800
+@@ -1 +1 @@
+-A
++B
+EOF
+
test_expect_success 'apply --whitespace=strip' '
rm -f sub/file1 &&
then
echo "Eh?"
false
- else
+ elif grep B sub/file1
+ then
echo Happy
+ else
+ echo "Huh?"
+ false
fi
'
then
echo "Eh?"
false
+ elif grep B sub/file1
+ then
+ echo Happy
else
echo Happy
fi
then
echo "Eh?"
false
- else
+ elif grep B file1
+ then
echo Happy
+ else
+ echo "Huh?"
+ false
fi
'
then
echo "Eh?"
false
+ elif grep B file1
+ then
+ echo Happy
else
+ echo "Huh?"
+ false
+ fi
+'
+
+test_expect_success 'same in subdir but with traditional patch input' '
+
+ cd "$D" &&
+ git config apply.whitespace strip &&
+ rm -f sub/file1 &&
+ cp saved sub/file1 &&
+ git update-index --refresh &&
+
+ cd sub &&
+ git apply -p0 ../gpatch.file &&
+ if grep " " file1
+ then
+ echo "Eh?"
+ false
+ elif grep B file1
+ then
echo Happy
+ else
+ echo "Huh?"
+ false
fi
'