diff options
author | Michael G. Schwern <schwern@pobox.com> | 2012-07-28 02:47:52 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-08-02 21:46:06 +0000 |
commit | 5eaa1fd086e826b1ac8d9346a740527edbdb3c34 (patch) | |
tree | 9e74ea2b6b8b6a655b5920ae96d34388e69eb322 /git-svn.perl | |
parent | 705b49cb81351020b57f9356487e9b3fdeea1e40 (diff) | |
download | git-5eaa1fd086e826b1ac8d9346a740527edbdb3c34.tar.gz |
git-svn: remove ad-hoc canonicalizations
[ew: commit title]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git-svn.perl b/git-svn.perl index 3d120d5bc4..56d1ba712a 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -36,6 +36,7 @@ use Git::SVN::Utils qw( canonicalize_url join_paths add_path_to_url + join_paths ); use Git qw( @@ -1598,7 +1599,7 @@ sub post_fetch_checkout { sub complete_svn_url { my ($url, $path) = @_; - $path =~ s#/+$##; + $path = canonicalize_path($path); # If the path is not a URL... if ($path !~ m#^[a-z\+]+://#) { @@ -1617,7 +1618,7 @@ sub complete_url_ls_init { print STDERR "W: $switch not specified\n"; return; } - $repo_path =~ s#/+$##; + $repo_path = canonicalize_path($repo_path); if ($repo_path =~ m#^[a-z\+]+://#) { $ra = Git::SVN::Ra->new($repo_path); $repo_path = ''; @@ -1638,9 +1639,8 @@ sub complete_url_ls_init { } command_oneline('config', $k, $gs->url) unless $orig_url; - my $remote_path = $gs->path . "/$repo_path"; + my $remote_path = join_paths( $gs->path, $repo_path ); $remote_path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg; - $remote_path =~ s#/+#/#g; $remote_path =~ s#^/##g; $remote_path .= "/*" if $remote_path !~ /\*/; my ($n) = ($switch =~ /^--(\w+)/); |