3 # Copyright (c) 2007 Eric Wong
6 test_description
='git svn dcommit can commit renames of files with ugly names'
10 test_expect_success
'load repository with strange names' '
11 svnadmin load -q "$rawsvnrepo" <"$TEST_DIRECTORY"/t9115/funky-names.dump
14 maybe_start_httpd gtk
+
16 test_expect_success
'init and fetch repository' '
17 git svn init "$svnrepo" &&
19 git reset --hard git-svn
22 test_expect_success
'create file in existing ugly and empty dir' '
23 mkdir -p "#{bad_directory_name}" &&
24 echo hi > "#{bad_directory_name}/ foo" &&
25 git update-index --add "#{bad_directory_name}/ foo" &&
26 git commit -m "new file in ugly parent" &&
30 test_expect_success
'rename ugly file' '
31 git mv "#{bad_directory_name}/ foo" "file name with feces" &&
32 git commit -m "rename ugly file" &&
36 test_expect_success
'rename pretty file' '
38 git update-index --add pretty &&
39 git commit -m "pretty :x" &&
41 mkdir -p regular_dir_name &&
42 git mv pretty regular_dir_name/pretty &&
43 git commit -m "moved pretty file" &&
47 test_expect_success
'rename pretty file into ugly one' '
48 git mv regular_dir_name/pretty "#{bad_directory_name}/ booboo" &&
49 git commit -m booboo &&
53 test_expect_success
'add a file with plus signs' '
55 git update-index --add +_+ &&
58 git mv +_+ gtk+/_+_ &&
59 git commit -m plus_dir &&
63 test_expect_success
'clone the repository to test rebase' '
64 git svn clone "$svnrepo" test-rebase &&
67 echo test-rebase >test-rebase &&
68 git add test-rebase &&
69 git commit -m test-rebase
73 test_expect_success
'make a commit to test rebase' '
74 echo test-rebase-main > test-rebase-main &&
75 git add test-rebase-main &&
76 git commit -m test-rebase-main &&
80 test_expect_success
'git svn rebase works inside a fresh-cloned repository' '
84 test -e test-rebase-main &&
88 # Without this, LC_ALL=C as set in test-lib.sh, and Cygwin converts
89 # non-ASCII characters in filenames unexpectedly, and causes errors.
90 # https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
91 # > Some characters are disallowed in filenames on Windows filesystems. ...
93 # > ... All of the above characters, except for the backslash, are converted
94 # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the
95 # > "Private use area") when creating or accessing files.
97 test_expect_success UTF8
,!MINGW
,!UTF8_NFD_TO_NFC
'svn.pathnameencoding=cp932 new file on dcommit' '
98 LC_ALL=$a_utf8_locale &&
100 neq=$(printf "\201\202") &&
101 git config svn.pathnameencoding cp932 &&
104 git commit -m "neq" &&
108 # See the comment on the above test for setting of LC_ALL.
109 test_expect_success
!MINGW
,!UTF8_NFD_TO_NFC
'svn.pathnameencoding=cp932 rename on dcommit' '
110 LC_ALL=$a_utf8_locale &&
112 inf=$(printf "\201\207") &&
113 git config svn.pathnameencoding cp932 &&
116 git commit -m "inf" &&
119 git commit -m "inf rename" &&