git-commit-vandalism/t/t9102-git-svn-deep-rmdir.sh
Jeff King e1c0c158b1 t/lib-git-svn: drop $remote_git_svn and $git_svn_id
These variables were added in 16805d3 (t/t91XX-svn: start
removing use of "git-" from these tests, 2008-09-08) so that
running:

  git grep git-

would return fewer hits. At the time, we were transitioning
away from the use of the "dashed" git-foo form.

That transition has been over for years, and grepping for
"git-" in the test suite yields thousands of hits anyway
(all presumably false positives).

With their original purpose gone, these variables serve only
to obfuscate the tests. Let's get rid of them.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-13 13:59:58 -07:00

32 lines
797 B
Bash
Executable File

#!/bin/sh
test_description='git svn rmdir'
. ./lib-git-svn.sh
test_expect_success 'initialize repo' '
mkdir import &&
(
cd import &&
mkdir -p deeply/nested/directory/number/1 &&
mkdir -p deeply/nested/directory/number/2 &&
echo foo >deeply/nested/directory/number/1/file &&
echo foo >deeply/nested/directory/number/2/another &&
svn_cmd import -m "import for git svn" . "$svnrepo"
)
'
test_expect_success 'mirror via git svn' '
git svn init "$svnrepo" &&
git svn fetch &&
git checkout -f -b test-rmdir remotes/git-svn
'
test_expect_success 'Try a commit on rmdir' '
git rm -f deeply/nested/directory/number/2/another &&
git commit -a -m "remove another" &&
git svn set-tree --rmdir HEAD &&
svn_cmd ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
'
test_done