Skip to content

Commit 8266fc8

Browse files
schwernEric Wong
authored andcommitted
git-svn: canonicalize earlier
Just a few things I noticed. Its good to canonicalize as early as possible. [ew: commit title] Signed-off-by: Eric Wong <normalperson@yhbt.net>
1 parent 9c27a57 commit 8266fc8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

git-svn.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,16 +1436,16 @@ sub cmd_info {
14361436
# canonicalize_path() will return "" to make libsvn 1.5.x happy,
14371437
$path = "." if $path eq "";
14381438

1439-
my $full_url = $url . ($fullpath eq "" ? "" : "/$fullpath");
1439+
my $full_url = canonicalize_url( $url . ($fullpath eq "" ? "" : "/$fullpath") );
14401440

14411441
if ($_url) {
1442-
print canonicalize_url($full_url), "\n";
1442+
print "$full_url\n";
14431443
return;
14441444
}
14451445

14461446
my $result = "Path: $path\n";
14471447
$result .= "Name: " . basename($path) . "\n" if $file_type ne "dir";
1448-
$result .= "URL: " . canonicalize_url($full_url) . "\n";
1448+
$result .= "URL: $full_url\n";
14491449

14501450
eval {
14511451
my $repos_root = $gs->repos_root;

perl/Git/SVN/Ra.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sub _auth_providers () {
6969

7070
sub new {
7171
my ($class, $url) = @_;
72-
$url =~ s!/+$!!;
72+
$url = canonicalize_url($url);
7373
return $RA if ($RA && $RA->url eq $url);
7474

7575
::_req_svn();
@@ -101,7 +101,7 @@ sub new {
101101
$Git::SVN::Prompt::_no_auth_cache = 1;
102102
}
103103
} # no warnings 'once'
104-
my $self = SVN::Ra->new(url => canonicalize_url($url), auth => $baton,
104+
my $self = SVN::Ra->new(url => $url, auth => $baton,
105105
config => $config,
106106
pool => SVN::Pool->new,
107107
auth_provider_callbacks => $callbacks);

0 commit comments

Comments
 (0)