зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
9c27a57b2d
Коммит
8266fc8be1
|
@ -1436,16 +1436,16 @@ sub cmd_info {
|
||||||
# canonicalize_path() will return "" to make libsvn 1.5.x happy,
|
# canonicalize_path() will return "" to make libsvn 1.5.x happy,
|
||||||
$path = "." if $path eq "";
|
$path = "." if $path eq "";
|
||||||
|
|
||||||
my $full_url = $url . ($fullpath eq "" ? "" : "/$fullpath");
|
my $full_url = canonicalize_url( $url . ($fullpath eq "" ? "" : "/$fullpath") );
|
||||||
|
|
||||||
if ($_url) {
|
if ($_url) {
|
||||||
print canonicalize_url($full_url), "\n";
|
print "$full_url\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $result = "Path: $path\n";
|
my $result = "Path: $path\n";
|
||||||
$result .= "Name: " . basename($path) . "\n" if $file_type ne "dir";
|
$result .= "Name: " . basename($path) . "\n" if $file_type ne "dir";
|
||||||
$result .= "URL: " . canonicalize_url($full_url) . "\n";
|
$result .= "URL: $full_url\n";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
my $repos_root = $gs->repos_root;
|
my $repos_root = $gs->repos_root;
|
||||||
|
|
|
@ -69,7 +69,7 @@ sub _auth_providers () {
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, $url) = @_;
|
my ($class, $url) = @_;
|
||||||
$url =~ s!/+$!!;
|
$url = canonicalize_url($url);
|
||||||
return $RA if ($RA && $RA->url eq $url);
|
return $RA if ($RA && $RA->url eq $url);
|
||||||
|
|
||||||
::_req_svn();
|
::_req_svn();
|
||||||
|
@ -101,7 +101,7 @@ sub new {
|
||||||
$Git::SVN::Prompt::_no_auth_cache = 1;
|
$Git::SVN::Prompt::_no_auth_cache = 1;
|
||||||
}
|
}
|
||||||
} # no warnings 'once'
|
} # no warnings 'once'
|
||||||
my $self = SVN::Ra->new(url => canonicalize_url($url), auth => $baton,
|
my $self = SVN::Ra->new(url => $url, auth => $baton,
|
||||||
config => $config,
|
config => $config,
|
||||||
pool => SVN::Pool->new,
|
pool => SVN::Pool->new,
|
||||||
auth_provider_callbacks => $callbacks);
|
auth_provider_callbacks => $callbacks);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче