Skip to content

Commit b1a954a

Browse files
author
Eric Wong
committed
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>
1 parent b4b3360 commit b1a954a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git-svn.perl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,6 +2055,9 @@ sub new {
20552055
"\":$ref_id\$\" in config\n";
20562056
($self->{path}, undef) = split(/\s*:\s*/, $fetch);
20572057
}
2058+
$self->{path} =~ s{/+}{/}g;
2059+
$self->{path} =~ s{\A/}{};
2060+
$self->{path} =~ s{/\z}{};
20582061
$self->{url} = command_oneline('config', '--get',
20592062
"svn-remote.$repo_id.url") or
20602063
die "Failed to read \"svn-remote.$repo_id.url\" in config\n";

0 commit comments

Comments
 (0)