summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f0daa62)
raw | patch | inline | side by side (parent: f0daa62)
author | Matthias Urlichs <smurf@smurf.noris.de> | |
Mon, 10 Oct 2005 10:45:46 +0000 (12:45 +0200) | ||
committer | Matthias Urlichs <smurf@smurf.noris.de> | |
Mon, 10 Oct 2005 10:45:46 +0000 (12:45 +0200) |
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>
arguments" is really annoying at times...
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
git-svnimport.perl | patch | blob | history |
diff --git a/git-svnimport.perl b/git-svnimport.perl
index 3844cc50dc7b0b2ab51d3691bd660a4336eddd08..415b50b35abcf9f54a9d4755f3b64f31a96ead49 100755 (executable)
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
my ($name, $res) = eval { $svn->file($svnpath,$rev); };
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";
my $sha = <$F>;
chomp $sha;
}
if(@old) {
- open F, "-│", "git-ls-files", "-z", @old or die $!;
+ open my $F, "-│", "git-ls-files", "-z", @old or die $!;
@old = ();
local $/ = '\0';
- while(<F>) {
+ while(<$F>) {
chomp;
push(@old,$_);
}
- close(F);
+ close($F);
while(@old) {
my @o2;