-#!/usr/bin/perl
#
# Example implementation for the Git filter protocol version 2
# See Documentation/gitattributes.txt, section "Filter Protocol"
use strict;
use warnings;
+use IO::File;
my $MAX_PACKET_CONTENT_SIZE = 65516;
my @capabilities = @ARGV;
$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();