mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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 0b2af457a4
(Fix branch detection when repository root is inaccessible)
Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
parent
f0e8b1a3ed
commit
2a679c7a31
|
@ -4525,10 +4525,12 @@ sub gs_do_switch {
|
|||
|
||||
my $full_url = $self->{url};
|
||||
my $old_url = $full_url;
|
||||
$full_url .= '/' . escape_uri_only($path) if length $path;
|
||||
$full_url .= '/' . $path if length $path;
|
||||
my ($ra, $reparented);
|
||||
|
||||
if ($old_url =~ m#^svn(\+ssh)?://#) {
|
||||
if ($old_url =~ m#^svn(\+ssh)?://# ||
|
||||
($full_url =~ m#^https?://# &&
|
||||
escape_url($full_url) ne $full_url)) {
|
||||
$_[0] = undef;
|
||||
$self = undef;
|
||||
$RA = undef;
|
||||
|
|
Loading…
Reference in a new issue