aboutsummaryrefslogtreecommitdiffstats
path: root/t/t7815-grep-binary.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7815-grep-binary.sh')
-rwxr-xr-xt/t7815-grep-binary.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/t/t7815-grep-binary.sh b/t/t7815-grep-binary.sh
index 90ebb64f46..3bd91da970 100755
--- a/t/t7815-grep-binary.sh
+++ b/t/t7815-grep-binary.sh
@@ -114,13 +114,10 @@ test_expect_success 'grep respects not-binary diff attribute' '
test_cmp expect actual
'
-cat >nul_to_q_textconv <<'EOF'
-#!/bin/sh
-"$PERL_PATH" -pe 'y/\000/Q/' < "$1"
-EOF
-chmod +x nul_to_q_textconv
-
test_expect_success 'setup textconv filters' '
+ write_script nul_to_q_textconv <<-\EOF &&
+ tr "\000" "Q" <"$1"
+ EOF
echo a diff=foo >.gitattributes &&
git config diff.foo.textconv "\"$(pwd)\""/nul_to_q_textconv
'