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
path: root/t/t0021
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 /t/t0021
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 't/t0021')
-rwxr-xr-xt/t0021/rot13-filter.pl8
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();