3 test_description
='git svn fetch deleted tag'
7 test_expect_success
'setup svn repo' '
8 mkdir -p import/trunk/subdir &&
9 mkdir -p import/branches &&
10 mkdir -p import/tags &&
11 echo "base" >import/trunk/subdir/file &&
12 svn_cmd import -m "import for git svn" import "$svnrepo" &&
15 svn_cmd mkdir -m "create mybranch directory" "$svnrepo/branches/mybranch" &&
16 svn_cmd cp -m "create branch mybranch" "$svnrepo/trunk" "$svnrepo/branches/mybranch/trunk" &&
18 svn_cmd co "$svnrepo/trunk" svn_project &&
20 echo "trunk change" >>subdir/file &&
21 svn_cmd ci -m "trunk change" subdir/file &&
23 svn_cmd switch "$svnrepo/branches/mybranch/trunk" &&
24 echo "branch change" >>subdir/file &&
25 svn_cmd ci -m "branch change" subdir/file
28 svn_cmd cp -m "create mytag attempt 1" -r5 "$svnrepo/trunk/subdir" "$svnrepo/tags/mytag" &&
29 svn_cmd rm -m "delete mytag attempt 1" "$svnrepo/tags/mytag" &&
30 svn_cmd cp -m "create mytag attempt 2" -r5 "$svnrepo/branches/mybranch/trunk/subdir" "$svnrepo/tags/mytag"
33 test_expect_success
'fetch deleted tags from same revision with checksum error' '
34 git svn init --stdlayout "$svnrepo" git_project &&
38 git diff --exit-code mybranch:trunk/subdir/file tags/mytag:file &&
39 git diff --exit-code master:subdir/file tags/mytag^:file