diff options
author | Jeff King <peff@peff.net> | 2016-11-02 14:20:22 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-11-02 19:36:29 -0700 |
commit | f272696a35678438a1edd0ad1d23c8c110ede3e5 (patch) | |
tree | 2785db836bd3d74b7ad2390f0dc0c86f87a528a2 /t/t4100/t-apply-3.expect | |
parent | t0021: put $TEST_ROOT in $PATH (diff) | |
download | tgif-f272696a35678438a1edd0ad1d23c8c110ede3e5.tar.xz |
t0021: use $PERL_PATH for rot13-filter.pl
The rot13-filter.pl script hardcodes "#!/usr/bin/perl", and
does not respect $PERL_PATH at all. That is a problem if the
system does not have perl at that path, or if it has a perl
that is too old to run a complicated script like the
rot13-filter (but PERL_PATH points to a more modern one).
We can fix this by using write_script() to create a new copy
of the script with the correct #!-line. In theory we could
move the whole script inside t0021-conversion.sh rather than
having it as an auxiliary file, but it's long enough that
it just makes things harder to read.
As a bonus, we can stop using the full path to the script in
the filter-process config we add (because the trash
directory is in our PATH). Not only is this shorter, but it
sidesteps any shell-quoting issues. The original was broken
when $TEST_DIRECTORY contained a space, because it was
interpolated in the outer script.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4100/t-apply-3.expect')
0 files changed, 0 insertions, 0 deletions