Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
svn import: fixed two pipe open calls.
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>
git-svnimport.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f0daa62
)
diff --git
a/git-svnimport.perl
b/git-svnimport.perl
index 3844cc50dc7b0b2ab51d3691bd660a4336eddd08..415b50b35abcf9f54a9d4755f3b64f31a96ead49 100755
(executable)
--- a/
git-svnimport.perl
+++ b/
git-svnimport.perl
@@
-290,7
+290,7
@@
($$$)
my ($name, $res) = eval { $svn->file($svnpath,$rev); };
return () unless defined $name;
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;
or die "Cannot create object: $!\n";
my $sha = <$F>;
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 = ();
local $/ = '\0';
@old = ();
local $/ = '\0';
- while(<F>) {
+ while(<
$
F>) {
chomp;
push(@old,$_);
}
chomp;
push(@old,$_);
}
- close(F);
+ close(
$
F);
while(@old) {
my @o2;
while(@old) {
my @o2;