aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl/Git/SVN/Editor.pm3
-rwxr-xr-xt/t9115-git-svn-dcommit-funky-renames.sh15
2 files changed, 17 insertions, 1 deletions
diff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm
index d9d9bdf33..4c4199afe 100644
--- a/perl/Git/SVN/Editor.pm
+++ b/perl/Git/SVN/Editor.pm
@@ -144,11 +144,12 @@ sub repo_path {
sub url_path {
my ($self, $path) = @_;
+ $path = $self->repo_path($path);
if ($self->{url} =~ m#^https?://#) {
# characters are taken from subversion/libsvn_subr/path.c
$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#sprintf("%%%02X",ord($1))#eg;
}
- $self->{url} . '/' . $self->repo_path($path);
+ $self->{url} . '/' . $path;
}
sub rmdirs {
diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh
index a3927c46b..0990f8d23 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -104,6 +104,21 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '
git svn dcommit
'
+# See the comment on the above test for setting of LC_ALL.
+test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '
+ LC_ALL=$a_utf8_locale &&
+ export LC_ALL &&
+ inf=$(printf "\201\207") &&
+ git config svn.pathnameencoding cp932 &&
+ echo inf >"$inf" &&
+ git add "$inf" &&
+ git commit -m "inf" &&
+ git svn dcommit &&
+ git mv "$inf" inf &&
+ git commit -m "inf rename" &&
+ git svn dcommit
+'
+
stop_httpd
test_done