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 /contrib | |
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 'contrib')
-rwxr-xr-x | contrib/long-running-filter/example.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/long-running-filter/example.pl b/contrib/long-running-filter/example.pl index 39457055a5..a677569ddd 100755 --- a/contrib/long-running-filter/example.pl +++ b/contrib/long-running-filter/example.pl @@ -81,8 +81,12 @@ packet_txt_write("capability=smudge"); packet_flush(); while (1) { - my ($command) = packet_txt_read() =~ /^command=([^=]+)$/; - my ($pathname) = packet_txt_read() =~ /^pathname=([^=]+)$/; + my ($command) = packet_txt_read() =~ /^command=(.+)$/; + my ($pathname) = packet_txt_read() =~ /^pathname=(.+)$/; + + if ( $pathname eq "" ) { + die "bad pathname '$pathname'"; + } packet_bin_read(); |