From fedd273b758e6aa844555e4e50ebfce59255e015 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 20 Feb 2006 14:02:47 -0800 Subject: [PATCH] rerere: avoid open "-|" list form for Perl 5.6 Signed-off-by: Junio C Hamano --- git-rerere.perl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-rerere.perl b/git-rerere.perl index df119517..d3664ff4 100755 --- a/git-rerere.perl +++ b/git-rerere.perl @@ -131,7 +131,11 @@ sub record_preimage { sub find_conflict { my $in; local $/ = "\0"; - open $in, '-|', qw(git ls-files -z -u) or die "$!: ls-files"; + my $pid = open($in, '-|'); + die "$!" unless defined $pid; + if (!$pid) { + exec(qw(git ls-files -z -u)) or die "$!: ls-files"; + } my %path = (); my @path = (); while (<$in>) { -- 2.11.0