aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKazutoshi Satoda <k_satoda@f2.dion.ne.jp>2016-02-09 00:21:02 +0900
committerEric Wong <normalperson@yhbt.net>2016-02-22 02:29:36 +0000
commit1b42f45255de5844b7fe8d0c60fea74cd5b9f954 (patch)
tree20547e8eaa53f091b31e93e6de03a1b8f08426e8 /t
parent40f47448a91666be8e2befe521525f3f507344f9 (diff)
downloadgit-1b42f45255de5844b7fe8d0c60fea74cd5b9f954.tar.gz
git-1b42f45255de5844b7fe8d0c60fea74cd5b9f954.tar.xz
git-svn: apply "svn.pathnameencoding" before URL encoding
The conversion from "svn.pathnameencoding" to UTF-8 should be applied first, and then URL encoding should be applied on the resulting UTF-8 path. The reversed order of these transforms (used before this fix) makes non-UTF-8 URL which causes error from Subversion such as "Filesystem has no item: '...' path not found" when sending a rename (or a copy) from non-ASCII path. [ew: t9115 test case added (requires SVN_HTTPD_PORT set to test), squash LC_ALL=$a_utf8_locale export from Kazutoshi for Cygwin] Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t9115-git-svn-dcommit-funky-renames.sh15
1 files changed, 15 insertions, 0 deletions
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