3 test_description='git svn fetch deleted tag 2'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10 test_expect_success 'setup svn repo' '
11 mkdir -p import/branches &&
12 mkdir -p import/tags &&
13 mkdir -p import/trunk/subdir1 &&
14 mkdir -p import/trunk/subdir2 &&
15 mkdir -p import/trunk/subdir3 &&
16 echo "file1" >import/trunk/subdir1/file &&
17 echo "file2" >import/trunk/subdir2/file &&
18 echo "file3" >import/trunk/subdir3/file &&
19 svn_cmd import -m "import for git svn" import "$svnrepo" &&
22 svn_cmd co "$svnrepo/trunk" svn_project &&
24 echo "change1" >>subdir1/file &&
25 echo "change2" >>subdir2/file &&
26 echo "change3" >>subdir3/file &&
27 svn_cmd ci -m "change" .
30 svn_cmd cp -m "create mytag 1" -r2 "$svnrepo/trunk/subdir1" "$svnrepo/tags/mytag" &&
31 svn_cmd rm -m "delete mytag 1" "$svnrepo/tags/mytag" &&
32 svn_cmd cp -m "create mytag 2" -r2 "$svnrepo/trunk/subdir2" "$svnrepo/tags/mytag" &&
33 svn_cmd rm -m "delete mytag 2" "$svnrepo/tags/mytag" &&
34 svn_cmd cp -m "create mytag 3" -r2 "$svnrepo/trunk/subdir3" "$svnrepo/tags/mytag"
37 test_expect_success 'fetch deleted tags from same revision with no checksum error' '
38 git svn init --stdlayout "$svnrepo" git_project &&
42 git diff --exit-code main:subdir3/file origin/tags/mytag:file &&
43 git diff --exit-code main:subdir2/file origin/tags/mytag^:file &&
44 git diff --exit-code main:subdir1/file origin/tags/mytag^^:file