Skip to content

Commit

Permalink
t0021: use $SHELL_PATH for the filter script
Browse files Browse the repository at this point in the history
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".  But the clean and smudge filters will not
always be invoked via 'sh -c'; to futureproof, we should mark the the one
in t0021-conversion with #!$SHELL_PATH.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Jan 6, 2010
1 parent 8dba1e6 commit fa7151a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/t0021-conversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ test_description='blob conversion via gitattributes'

. ./test-lib.sh

cat <<\EOF >rot13.sh
cat <<EOF >rot13.sh
#!$SHELL_PATH
tr \
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
Expand Down

0 comments on commit fa7151a

Please sign in to comment.