mirror of
https://github.com/git/git.git
synced 2024-10-30 22:07:53 +01:00
5bc99d3f63
The "--parents" option did not appear until SVN 1.5.x and is completely unnecessary in this case. Reported-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Eric Wong <normalperson@yhbt.net>
42 lines
1.3 KiB
Bash
Executable file
42 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='git svn fetch deleted tag'
|
|
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'setup svn repo' '
|
|
mkdir -p import/trunk/subdir &&
|
|
mkdir -p import/branches &&
|
|
mkdir -p import/tags &&
|
|
echo "base" >import/trunk/subdir/file &&
|
|
svn_cmd import -m "import for git svn" import "$svnrepo" &&
|
|
rm -rf import &&
|
|
|
|
svn_cmd mkdir -m "create mybranch directory" "$svnrepo/branches/mybranch" &&
|
|
svn_cmd cp -m "create branch mybranch" "$svnrepo/trunk" "$svnrepo/branches/mybranch/trunk" &&
|
|
|
|
svn_cmd co "$svnrepo/trunk" svn_project &&
|
|
(cd svn_project &&
|
|
echo "trunk change" >>subdir/file &&
|
|
svn_cmd ci -m "trunk change" subdir/file &&
|
|
|
|
svn_cmd switch "$svnrepo/branches/mybranch/trunk" &&
|
|
echo "branch change" >>subdir/file &&
|
|
svn_cmd ci -m "branch change" subdir/file
|
|
) &&
|
|
|
|
svn_cmd cp -m "create mytag attempt 1" -r5 "$svnrepo/trunk/subdir" "$svnrepo/tags/mytag" &&
|
|
svn_cmd rm -m "delete mytag attempt 1" "$svnrepo/tags/mytag" &&
|
|
svn_cmd cp -m "create mytag attempt 2" -r5 "$svnrepo/branches/mybranch/trunk/subdir" "$svnrepo/tags/mytag"
|
|
'
|
|
|
|
test_expect_success 'fetch deleted tags from same revision with checksum error' '
|
|
git svn init --stdlayout "$svnrepo" git_project &&
|
|
cd git_project &&
|
|
git svn fetch &&
|
|
|
|
git diff --exit-code mybranch:trunk/subdir/file tags/mytag:file &&
|
|
git diff --exit-code master:subdir/file tags/mytag^:file
|
|
'
|
|
|
|
test_done
|