X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-svnimport.perl;h=aa5b3b2c9700d9a3cfe79011499405b67da6b33e;hb=acef41c9db33f2261e46e17cca098df3403dd745;hp=b73d6494d80fe5ee19e1d95971e2e4e64e980dea;hpb=7c851733e4bc2b36bd9df63cab2fe11180242670;p=git.git diff --git a/git-svnimport.perl b/git-svnimport.perl index b73d6494d..aa5b3b2c9 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); @@ -633,7 +633,7 @@ sub commit { my $rev; if($revision > $opt_s and defined $parent) { - open(H,"git-rev-parse --verify $parent |"); + open(H,'-|',"git-rev-parse","--verify",$parent); $rev = ; close(H) or do { print STDERR "$revision: cannot find commit '$parent'!\n"; @@ -873,7 +873,7 @@ sub commit { $dest =~ tr/_/\./ if $opt_u; - system('git-tag', $dest, $cid) == 0 + system('git-tag', '-f', $dest, $cid) == 0 or die "Cannot create tag $dest: $!\n"; print "Created tag '$dest' on '$branch'\n" if $opt_v;