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>
Matthias Urlichs committed
Oct 10, 2005 at 12:45 UTC
6d281217b930466717d0078285e5431c409b7aec
1 file changed
+4
-4
git-svnimport.perl
+4
-4
@@ -290,7 +290,7 @@ sub get_file($$$) {
290
my ($name, $res) = eval { $svn->file($svnpath,$rev); };
291
return () unless defined $name;
292
293
- open my $F, '-|', "git-hash-object -w $name"
293
+ open my $F, '-|', "git-hash-object", "-w", $name
294
or die "Cannot create object: $!\n";
295
my $sha = <$F>;
296
chomp $sha;
@@ -437,14 +437,14 @@ sub commit {
437
}
438
439
if(@old) {
440
- open F, "-│", "git-ls-files", "-z", @old or die $!;
440
+ open my $F, "-│", "git-ls-files", "-z", @old or die $!;
441
@old = ();
442
local $/ = '\0';
443
- while(<F>) {
443
+ while(<$F>) {
444
chomp;
445
push(@old,$_);
446
}
447
- close(F);
447
+ close($F);
448
449
while(@old) {
450
my @o2;