X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-svn.perl;h=19d6848d0e7754b9afb9fdbbac6fce31286468a5;hb=8718e875080767f2c8d06c55c3fb5a6dddf0e5a0;hp=09c4ca56f0c9af9c6ff49d3b3a197a8e30602520;hpb=40e9b27dec28692464f43d1c213d465fed8994ba;p=git.git diff --git a/git-svn.perl b/git-svn.perl index 09c4ca56f..19d6848d0 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -963,6 +963,7 @@ sub cmd_multi_init { } do_git_init_db(); if (defined $_trunk) { + $_trunk =~ s#^/+##; my $trunk_ref = 'refs/remotes/' . $_prefix . 'trunk'; # try both old-style and new-style lookups: my $gs_trunk = eval { Git::SVN->new($trunk_ref) }; @@ -2054,6 +2055,9 @@ sub new { "\":$ref_id\$\" in config\n"; ($self->{path}, undef) = split(/\s*:\s*/, $fetch); } + $self->{path} =~ s{/+}{/}g; + $self->{path} =~ s{\A/}{}; + $self->{path} =~ s{/\z}{}; $self->{url} = command_oneline('config', '--get', "svn-remote.$repo_id.url") or die "Failed to read \"svn-remote.$repo_id.url\" in config\n";