Merge 'git-gui' into HEAD
[git/mingw/4msysgit.git] / t / t9155-git-svn-fetch-deleted-tag.sh
bloba486a98f84e741d6f16da55bfc537abdacb9a58f
1 #!/bin/sh
3 test_description='git svn fetch deleted tag'
5 . ./lib-git-svn.sh
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" &&
13 rm -rf import &&
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 &&
19 (cd 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
26 ) &&
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 &&
35 cd git_project &&
36 git svn fetch &&
38 git diff --exit-code mybranch:trunk/subdir/file tags/mytag:file &&
39 git diff --exit-code master:subdir/file tags/mytag^:file
42 test_done