Display an error from update-ref if target ref name is invalid.
[git/jnareb-git.git] / t / t9102-git-svn-deep-rmdir.sh
blobd693d183c8e41a4c1e948e690f42a55c985543b3
1 test_description='git-svn rmdir'
2 . ./lib-git-svn.sh
4 test_expect_success 'initialize repo' "
5 mkdir import &&
6 cd import &&
7 mkdir -p deeply/nested/directory/number/1 &&
8 mkdir -p deeply/nested/directory/number/2 &&
9 echo foo > deeply/nested/directory/number/1/file &&
10 echo foo > deeply/nested/directory/number/2/another &&
11 svn import -m 'import for git-svn' . $svnrepo &&
12 cd ..
15 test_expect_success 'mirror via git-svn' "
16 git-svn init $svnrepo &&
17 git-svn fetch &&
18 git checkout -f -b test-rmdir remotes/git-svn
21 test_expect_success 'Try a commit on rmdir' "
22 git rm -f deeply/nested/directory/number/2/another &&
23 git commit -a -m 'remove another' &&
24 git-svn commit --rmdir HEAD &&
25 svn ls -R $svnrepo | grep ^deeply/nested/directory/number/1
29 test_done