aboutsummaryrefslogtreecommitdiff
path: root/git-rerere.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-rerere.perl')
-rwxr-xr-xgit-rerere.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-rerere.perl b/git-rerere.perl
index df119517f..d3664ff49 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>) {