summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e415907)
raw | patch | inline | side by side (parent: e415907)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 20 Feb 2006 22:14:15 +0000 (14:14 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 20 Feb 2006 22:24:05 +0000 (14:24 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svnimport.perl | patch | blob | history |
diff --git a/git-svnimport.perl b/git-svnimport.perl
index c536d7026d4c56dbf5ca0ccb1a93c25a956a64ba..ee2940f4803955f2746baf3c78f64a67b4790cab 100755 (executable)
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
# The head revision is on branch "origin" by default.
# You can change that with the '-o' option.
-require 5.008; # for shell-safe open("-|",LIST)
use strict;
use warnings;
use Getopt::Std;
return undef unless defined $name;
}
- open my $F, '-|', "git-hash-object", "-w", $name
+ my $pid = open(my $F, '-|');
+ die $! unless defined $pid;
+ if (!$pid) {
+ exec("git-hash-object", "-w", $name)
or die "Cannot create object: $!\n";
+ }
my $sha = <$F>;
chomp $sha;
close $F;
$srcpath =~ s#/*$#/#;
}
- open my $f,"-|","git-ls-tree","-r","-z",$gitrev,$srcpath;
+ my $pid = open my $f,'-|';
+ die $! unless defined $pid;
+ if (!$pid) {
+ exec("git-ls-tree","-r","-z",$gitrev,$srcpath)
+ or die $!;
+ }
local $/ = "\0";
while(<$f>) {
chomp;
@o1 = @old;
@old = ();
}
- open my $F, "-|", "git-ls-files", "-z", @o1 or die $!;
+ my $pid = open my $F, "-|";
+ die "$!" unless defined $pid;
+ if (!$pid) {
+ exec("git-ls-files", "-z", @o1) or die $!;
+ }
@o1 = ();
local $/ = "\0";
while(<$F>) {