t / t9102-git-svn-deep-rmdir.shon commit Merge branch 'tb/document-status-u-tradeoff' (5d04924)
   1#!/bin/sh
   2test_description='git svn rmdir'
   3. ./lib-git-svn.sh
   4
   5test_expect_success 'initialize repo' '
   6        mkdir import &&
   7        (
   8                cd import &&
   9                mkdir -p deeply/nested/directory/number/1 &&
  10                mkdir -p deeply/nested/directory/number/2 &&
  11                echo foo >deeply/nested/directory/number/1/file &&
  12                echo foo >deeply/nested/directory/number/2/another &&
  13                svn_cmd import -m "import for git svn" . "$svnrepo"
  14        )
  15        '
  16
  17test_expect_success 'mirror via git svn' '
  18        git svn init "$svnrepo" &&
  19        git svn fetch &&
  20        git checkout -f -b test-rmdir ${remotes_git_svn}
  21        '
  22
  23test_expect_success 'Try a commit on rmdir' '
  24        git rm -f deeply/nested/directory/number/2/another &&
  25        git commit -a -m "remove another" &&
  26        git svn set-tree --rmdir HEAD &&
  27        svn_cmd ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
  28        '
  29
  30
  31test_done