3 test_description
='git svn fetch deleted tag'
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/trunk/subdir &&
12 mkdir -p import/branches &&
13 mkdir -p import/tags &&
14 echo "base" >import/trunk/subdir/file &&
15 svn_cmd import -m "import for git svn" import "$svnrepo" &&
18 svn_cmd mkdir -m "create mybranch directory" "$svnrepo/branches/mybranch" &&
19 svn_cmd cp -m "create branch mybranch" "$svnrepo/trunk" "$svnrepo/branches/mybranch/trunk" &&
21 svn_cmd co "$svnrepo/trunk" svn_project &&
23 echo "trunk change" >>subdir/file &&
24 svn_cmd ci -m "trunk change" subdir/file &&
26 svn_cmd switch "$svnrepo/branches/mybranch/trunk" &&
27 echo "branch change" >>subdir/file &&
28 svn_cmd ci -m "branch change" subdir/file
31 svn_cmd cp -m "create mytag attempt 1" -r5 "$svnrepo/trunk/subdir" "$svnrepo/tags/mytag" &&
32 svn_cmd rm -m "delete mytag attempt 1" "$svnrepo/tags/mytag" &&
33 svn_cmd cp -m "create mytag attempt 2" -r5 "$svnrepo/branches/mybranch/trunk/subdir" "$svnrepo/tags/mytag"
36 test_expect_success
'fetch deleted tags from same revision with checksum error' '
37 git svn init --stdlayout "$svnrepo" git_project &&
41 git diff --exit-code origin/mybranch:trunk/subdir/file origin/tags/mytag:file &&
42 git diff --exit-code main:subdir/file origin/tags/mytag^:file