summaryrefslogtreecommitdiff
path: root/git-svnimport.perl
diff options
context:
space:
mode:
authorAlberto Bertogli <albertito@gmail.com>2007-08-14 01:03:18 -0300
committerJunio C Hamano <gitster@pobox.com>2007-08-13 21:19:20 -0700
commit0476786e645ae18096d6a63de5fd4b756071b522 (patch)
treed638a8602d8b6b0d716f0e36b64e35f230b3f6ca /git-svnimport.perl
parent70f64148bf7ca5136f2aa18c41b3b8f4bebfd138 (diff)
downloadgit-0476786e645ae18096d6a63de5fd4b756071b522.tar.gz
Allow git-svnimport to take "" as the trunk directory.
Some repositories started with the trunk in "/" and then moved it to the standard "trunk/" location. On these repositories, the correct thing would be to call git-svnimport -T "", but because of the way the options are handled, it uses the default "trunk" instead of the given empty string. This patch fixes that behaviour. Reported by Leandro Lucarella <llucax@gmail.com>. Signed-off-by: Alberto Bertogli <albertito@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svnimport.perl')
-rwxr-xr-xgit-svnimport.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-svnimport.perl b/git-svnimport.perl
index b73d6494d8..8c17fb5ae2 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -49,7 +49,7 @@ getopts("A:b:C:dDFhiI:l:mM:o:rs:t:T:SP:R:uv") or usage();
usage if $opt_h;
my $tag_name = $opt_t || "tags";
-my $trunk_name = $opt_T || "trunk";
+my $trunk_name = defined $opt_T ? $opt_T : "trunk";
my $branch_name = $opt_b || "branches";
my $project_name = $opt_P || "";
$project_name = "/" . $project_name if ($project_name);