summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>2007-04-24 11:51:04 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-04-24 16:14:40 (GMT)
commit46f6178a3f4e7a5bf8b47da0f3cc5c998d907ce8 (patch)
treef79560278286e0a4cecffe805c582c921cc6683b
parenta5c1780a0355a71b9fb70f1f1977ce726ee5b8d8 (diff)
downloadgit-46f6178a3f4e7a5bf8b47da0f3cc5c998d907ce8.zip
git-46f6178a3f4e7a5bf8b47da0f3cc5c998d907ce8.tar.gz
git-46f6178a3f4e7a5bf8b47da0f3cc5c998d907ce8.tar.bz2
fix importing of subversion tars
add a / between the prefix and name fields of the tar archive if prefix is non-empty. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xcontrib/fast-import/import-tars.perl7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 5585a8b..1842146 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -64,7 +64,12 @@ foreach my $tar_file (@ARGV)
}
print FI "\n";
- my $path = "$prefix$name";
+ my $path;
+ if ($prefix) {
+ $path = "$prefix/$name";
+ } else {
+ $path = "$name";
+ }
$files{$path} = [$next_mark++, $mode];
$commit_time = $mtime if $mtime > $commit_time;