diff options
author | Lars Schneider <larsxschneider@gmail.com> | 2016-12-03 20:45:16 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-06 11:29:52 -0800 |
commit | c6b0831c9c1718b552872953b4949cef7d4726fe (patch) | |
tree | 406e9bbe13887835111251d4a331a6e47d2cd46c /t/t0021 | |
parent | a0d8b60da82839614750dd64f442c4e9b446f8ef (diff) | |
download | git-c6b0831c9c1718b552872953b4949cef7d4726fe.tar.gz |
docs: warn about possible '=' in clean/smudge filter process values
A pathname value in a clean/smudge filter process "key=value" pair can
contain the '=' character (introduced in edcc858). Make the user aware
of this issue in the docs, add a corresponding test case, and fix the
issue in filter process value parser of the example implementation in
contrib.
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0021')
-rwxr-xr-x | t/t0021/rot13-filter.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl index ae4c50f5c5..02b3363fd9 100755 --- a/t/t0021/rot13-filter.pl +++ b/t/t0021/rot13-filter.pl @@ -109,14 +109,18 @@ print $debug "init handshake complete\n"; $debug->flush(); while (1) { - my ($command) = packet_txt_read() =~ /^command=([^=]+)$/; + my ($command) = packet_txt_read() =~ /^command=(.+)$/; print $debug "IN: $command"; $debug->flush(); - my ($pathname) = packet_txt_read() =~ /^pathname=([^=]+)$/; + my ($pathname) = packet_txt_read() =~ /^pathname=(.+)$/; print $debug " $pathname"; $debug->flush(); + if ( $pathname eq "" ) { + die "bad pathname '$pathname'"; + } + # Flush packet_bin_read(); |