Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2012-07-28 13:47:50 +0400
committerEric Wong <normalperson@yhbt.net>2012-08-03 01:46:03 +0400
commitd2fd119c4fcaea266a894354b506959376140c37 (patch)
tree887faa7b3d86d181a3160256452bf890a8da632f /git-svn.perl
parent8266fc8be19ef1405d4ef175bb0e75ebc2730f5d (diff)
git-svn: introduce add_path_to_url function
Remove the ad-hoc versions. This is mostly to normalize the process and ensure the URLs produced don't have double slashes or anything. Also provides a place to fix the corner case where a file path contains a percent sign. [ew: commit title] Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 6b9076599b..3d120d5bc4 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -35,6 +35,7 @@ use Git::SVN::Utils qw(
canonicalize_path
canonicalize_url
join_paths
+ add_path_to_url
);
use Git qw(
@@ -1436,7 +1437,7 @@ sub cmd_info {
# canonicalize_path() will return "" to make libsvn 1.5.x happy,
$path = "." if $path eq "";
- my $full_url = canonicalize_url( $url . ($fullpath eq "" ? "" : "/$fullpath") );
+ my $full_url = canonicalize_url( add_path_to_url( $url, $fullpath ) );
if ($_url) {
print "$full_url\n";