svn import: fixed two pipe open calls.
Perl's magic "different semantics of open() based on the number of arguments" is really annoying at times... Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
This commit is contained in:
parent
f0daa628a2
commit
6d281217b9
@ -290,7 +290,7 @@ sub get_file($$$) {
|
|||||||
my ($name, $res) = eval { $svn->file($svnpath,$rev); };
|
my ($name, $res) = eval { $svn->file($svnpath,$rev); };
|
||||||
return () unless defined $name;
|
return () unless defined $name;
|
||||||
|
|
||||||
open my $F, '-|', "git-hash-object -w $name"
|
open my $F, '-|', "git-hash-object", "-w", $name
|
||||||
or die "Cannot create object: $!\n";
|
or die "Cannot create object: $!\n";
|
||||||
my $sha = <$F>;
|
my $sha = <$F>;
|
||||||
chomp $sha;
|
chomp $sha;
|
||||||
@ -437,14 +437,14 @@ sub commit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(@old) {
|
if(@old) {
|
||||||
open F, "-│", "git-ls-files", "-z", @old or die $!;
|
open my $F, "-│", "git-ls-files", "-z", @old or die $!;
|
||||||
@old = ();
|
@old = ();
|
||||||
local $/ = '\0';
|
local $/ = '\0';
|
||||||
while(<F>) {
|
while(<$F>) {
|
||||||
chomp;
|
chomp;
|
||||||
push(@old,$_);
|
push(@old,$_);
|
||||||
}
|
}
|
||||||
close(F);
|
close($F);
|
||||||
|
|
||||||
while(@old) {
|
while(@old) {
|
||||||
my @o2;
|
my @o2;
|
||||||
|
Loading…
Reference in New Issue
Block a user