Re: [PATCH] change Perl syntax to support Perl 5.6
On Sat, Aug 30, 2008 at 08:34:13PM +0200, Robert Schiele wrote:
Show 5 quoted lines
> If there are problems with that change I recommend just using my
> initial patch changing the documentation to require Perl 5.8 since my
> interest in Perl 5.6 support is not big enough to mess around with
> quoting all that stuff. If someone really needs this he or she can
> still do it --- it should be not too difficult.
I think it is as simple as:
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index da768ee..4ee6f89 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -61,7 +61,7 @@ sub run_cmd_pipe {
return qx{@args};
} else {
my $fh = undef;
- open($fh, '-|', @_) or die;
+ open($fh, '-|', join(' ', map { quotemeta($_) } @_)) or die;
return <$fh>;
}
}
But I didn't do any testing beyond checking that "git add -i 'file with
spaces'" which was broken by your patch now works at all.
-Peff