t4012: Actually quote the sed script
The nested quoting is not needed in this cases, thus the previous version did work just fine. Nevertheless the usage is misleading, so just achieve nested quoting by using double quotes instead. Lower the probability of breakage in the future and make the code easier to read. NOTE: Just dropping the single quotes around the sed arguments would have also been possible. Signed-off-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexander Strasser committed
Jul 16, 2012 at 22:43 UTC
4a2b716e220f0f5369c386d7257b87399d424a3f
1 file changed
+2
-2
t/t4012-diff-binary.sh
+2
-2
@@ -64,7 +64,7 @@ test_expect_success 'apply --numstat understands diff --binary format' '
64
# apply needs to be able to skip the binary material correctly
65
# in order to report the line number of a corrupt patch.
66
test_expect_success 'apply detecting corrupt patch correctly' '
67
- git diff | sed -e 's/-CIT/xCIT/' >broken &&
67
+ git diff | sed -e "s/-CIT/xCIT/" >broken &&
68
if git apply --stat --summary broken 2>detected
69
then
70
echo unhappy - should have detected an error
@@ -79,7 +79,7 @@ test_expect_success 'apply detecting corrupt patch correctly' '
79
'
80
81
test_expect_success 'apply detecting corrupt patch correctly' '
82
- git diff --binary | sed -e 's/-CIT/xCIT/' >broken &&
82
+ git diff --binary | sed -e "s/-CIT/xCIT/" >broken &&
83
if git apply --stat --summary broken 2>detected
84
then
85
echo unhappy - should have detected an error