Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Schneider <larsxschneider@gmail.com>2016-12-03 22:45:16 +0300
committerJunio C Hamano <gitster@pobox.com>2016-12-06 22:29:52 +0300
commitc6b0831c9c1718b552872953b4949cef7d4726fe (patch)
tree406e9bbe13887835111251d4a331a6e47d2cd46c /contrib/long-running-filter
parenta0d8b60da82839614750dd64f442c4e9b446f8ef (diff)
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/long-running-filter')
-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 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();