@matheusbsbs / matheus-bagliano / commits / 0476786e64
Fork 0

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>

Alberto Bertogli committed Aug 14, 2007 at 01:03 UTC 0476786e645ae18096d6a63de5fd4b756071b522
1 file changed +1 -1
git-svnimport.perl
+1 -1
@@ -49,7 +49,7 @@ getopts("A:b:C:dDFhiI:l:mM:o:rs:t:T:SP:R:uv") or usage();
49 usage if $opt_h;
50
51 my $tag_name = $opt_t || "tags";
52 -my $trunk_name = $opt_T || "trunk";
52 +my $trunk_name = defined $opt_T ? $opt_T : "trunk";
53 my $branch_name = $opt_b || "branches";
54 my $project_name = $opt_P || "";
55 $project_name = "/" . $project_name if ($project_name);