Merge branch 'rs/optim-text-wrap' into maint
[tgit.git] / t / t9115-git-svn-dcommit-funky-renames.sh
blob767799e7a70b91ef6f4e3f4007529f1cb0fd919c
1 #!/bin/sh
3 # Copyright (c) 2007 Eric Wong
6 test_description='git svn dcommit can commit renames of files with ugly names'
8 . ./lib-git-svn.sh
10 test_expect_success 'load repository with strange names' '
11 svnadmin load -q "$rawsvnrepo" < "$TEST_DIRECTORY"/t9115/funky-names.dump &&
12 start_httpd gtk+
15 test_expect_success 'init and fetch repository' '
16 git svn init "$svnrepo" &&
17 git svn fetch &&
18 git reset --hard git-svn
21 test_expect_success 'create file in existing ugly and empty dir' '
22 mkdir -p "#{bad_directory_name}" &&
23 echo hi > "#{bad_directory_name}/ foo" &&
24 git update-index --add "#{bad_directory_name}/ foo" &&
25 git commit -m "new file in ugly parent" &&
26 git svn dcommit
29 test_expect_success 'rename ugly file' '
30 git mv "#{bad_directory_name}/ foo" "file name with feces" &&
31 git commit -m "rename ugly file" &&
32 git svn dcommit
35 test_expect_success 'rename pretty file' '
36 echo :x > pretty &&
37 git update-index --add pretty &&
38 git commit -m "pretty :x" &&
39 git svn dcommit &&
40 mkdir -p regular_dir_name &&
41 git mv pretty regular_dir_name/pretty &&
42 git commit -m "moved pretty file" &&
43 git svn dcommit
46 test_expect_success 'rename pretty file into ugly one' '
47 git mv regular_dir_name/pretty "#{bad_directory_name}/ booboo" &&
48 git commit -m booboo &&
49 git svn dcommit
52 test_expect_success 'add a file with plus signs' '
53 echo .. > +_+ &&
54 git update-index --add +_+ &&
55 git commit -m plus &&
56 mkdir gtk+ &&
57 git mv +_+ gtk+/_+_ &&
58 git commit -m plus_dir &&
59 git svn dcommit
62 test_expect_success 'clone the repository to test rebase' '
63 git svn clone "$svnrepo" test-rebase &&
64 cd test-rebase &&
65 echo test-rebase > test-rebase &&
66 git add test-rebase &&
67 git commit -m test-rebase &&
68 cd ..
71 test_expect_success 'make a commit to test rebase' '
72 echo test-rebase-main > test-rebase-main &&
73 git add test-rebase-main &&
74 git commit -m test-rebase-main &&
75 git svn dcommit
78 test_expect_success 'git svn rebase works inside a fresh-cloned repository' '
79 cd test-rebase &&
80 git svn rebase &&
81 test -e test-rebase-main &&
82 test -e test-rebase
85 stop_httpd
87 test_done