Skip to content

Commit 2a679c7

Browse files
author
Eric Wong
committed
git svn: fix reparenting when ugly http(s) URLs are used
Mishandling of http(s) in need of escaping was causing t9118-git-svn-funky-branch-names to fail when SVN_HTTPD_PORT was defined. This bug was exposed in (but not caused by) commit 0b2af45 (Fix branch detection when repository root is inaccessible) Signed-off-by: Eric Wong <[email protected]>
1 parent f0e8b1a commit 2a679c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

git-svn.perl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4525,10 +4525,12 @@ sub gs_do_switch {
45254525

45264526
my $full_url = $self->{url};
45274527
my $old_url = $full_url;
4528-
$full_url .= '/' . escape_uri_only($path) if length $path;
4528+
$full_url .= '/' . $path if length $path;
45294529
my ($ra, $reparented);
45304530

4531-
if ($old_url =~ m#^svn(\+ssh)?://#) {
4531+
if ($old_url =~ m#^svn(\+ssh)?://# ||
4532+
($full_url =~ m#^https?://# &&
4533+
escape_url($full_url) ne $full_url)) {
45324534
$_[0] = undef;
45334535
$self = undef;
45344536
$RA = undef;

0 commit comments

Comments
 (0)