From: Johannes Sixt Date: Fri, 01 Jan 2010 22:14:06 GMT Subject: [PATCH 7/6] t0021: use $SHELL_PATH for the filter script Message-ID: <4B3E73AE.6050003@kdbg.org> In-Reply-To: <20091230110335.GF22959@coredump.intra.peff.net> On Windows, we need the shbang line to correctly invoke shell scripts via a POSIX shell, except when the script is invoked via 'sh -c' because sh (a bash) does "the right thing". Since nowadays the clean and smudge filters are not always invoked via 'sh -c' anymore, we have to mark the the one in t0021-conversion with #!$SHELL_PATH. Signed-off-by: Johannes Sixt --- t/t0021-conversion.sh | 3 ++- t/t4030-diff-textconv.sh | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index 8fc39d7..6cb8d60 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -4,7 +4,8 @@ test_description='blob conversion via gitattributes' . ./test-lib.sh -cat <<\EOF >rot13.sh +cat <rot13.sh +#!$SHELL_PATH tr \ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \ 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM' diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh index c16d538..3cb7e63 100755 --- a/t/t4030-diff-textconv.sh +++ b/t/t4030-diff-textconv.sh @@ -19,10 +19,12 @@ cat >expect.text <<'EOF' +1 EOF -cat >hexdump <<'EOF' -#!/bin/sh +{ + echo "#!$SHELL_PATH" + cat <<'EOF' perl -e '$/ = undef; $_ = <>; s/./ord($&)/ge; print $_' < "$1" EOF +} >hexdump chmod +x hexdump test_expect_success 'setup binary file with history' ' -- 1.6.6.1073.gd853b.dirty