aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-14 04:31:10 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-14 04:49:22 +0000
commitb1a954a37cea7d5a0a123758f6c2ad9005d4481e (patch)
tree94755a852f7dd469be90283d5a979670e1e656ec /git-svn.perl
parentb4b3360078e758221db3f7b496e35ccb43364151 (diff)
downloadgit-b1a954a37cea7d5a0a123758f6c2ad9005d4481e.tar.gz
git-b1a954a37cea7d5a0a123758f6c2ad9005d4481e.tar.xz
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 80ab45065..19d6848d0 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";