Skip to content

Commit

Permalink
git svn: fix reparenting when ugly http(s) URLs are used
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Eric Wong committed Jul 20, 2009
1 parent f0e8b1a commit 2a679c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2a679c7

Please sign in to comment.