summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLars Schneider <larsxschneider@gmail.com>2016-12-03 19:45:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-06 19:29:52 (GMT)
commitc6b0831c9c1718b552872953b4949cef7d4726fe (patch)
tree406e9bbe13887835111251d4a331a6e47d2cd46c /contrib
parenta0d8b60da82839614750dd64f442c4e9b446f8ef (diff)
downloadgit-c6b0831c9c1718b552872953b4949cef7d4726fe.zip
git-c6b0831c9c1718b552872953b4949cef7d4726fe.tar.gz
git-c6b0831c9c1718b552872953b4949cef7d4726fe.tar.bz2
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-xcontrib/long-running-filter/example.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/long-running-filter/example.pl b/contrib/long-running-filter/example.pl
index 3945705..a677569 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();