Re: [PATCH] change Perl syntax to support Perl 5.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 30, 2008 at 08:34:13PM +0200, Robert Schiele wrote:

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux