@matheusbsbs / matheus-bagliano / commits / b1a954a37c
Fork 0

git svn: avoid unnecessary '/' in paths for SVN

svn:// servers are more picky regarding redundant slashes than file:// and http(s)://-backed respositories. Since the last commit, we avoid putting unnecessary slashes in $GIT_CONFIG, but this doesn't help users who are already set up that way. Signed-off-by: Eric Wong <normalperson@yhbt.net>

Eric Wong committed Jun 14, 2010 at 04:31 UTC b1a954a37cea7d5a0a123758f6c2ad9005d4481e
1 file changed +3
git-svn.perl
+3
@@ -2055,6 +2055,9 @@ sub new {
2055 "\":$ref_id\$\" in config\n";
2056 ($self->{path}, undef) = split(/\s*:\s*/, $fetch);
2057 }
2058 + $self->{path} =~ s{/+}{/}g;
2059 + $self->{path} =~ s{\A/}{};
2060 + $self->{path} =~ s{/\z}{};
2061 $self->{url} = command_oneline('config', '--get',
2062 "svn-remote.$repo_id.url") or
2063 die "Failed to read \"svn-remote.$repo_id.url\" in config\n";