From b1a954a37cea7d5a0a123758f6c2ad9005d4481e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 14 Jun 2010 04:31:10 +0000 Subject: [PATCH] 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 --- git-svn.perl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-svn.perl b/git-svn.perl index 80ab45065e..19d6848d0e 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2055,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"; -- 2.11.4.GIT