a881baa2c3
This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t9[0-4]*.sh) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
48 lines
1.5 KiB
Bash
Executable File
48 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='git svn fetch deleted tag 2'
|
|
|
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
|
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'setup svn repo' '
|
|
mkdir -p import/branches &&
|
|
mkdir -p import/tags &&
|
|
mkdir -p import/trunk/subdir1 &&
|
|
mkdir -p import/trunk/subdir2 &&
|
|
mkdir -p import/trunk/subdir3 &&
|
|
echo "file1" >import/trunk/subdir1/file &&
|
|
echo "file2" >import/trunk/subdir2/file &&
|
|
echo "file3" >import/trunk/subdir3/file &&
|
|
svn_cmd import -m "import for git svn" import "$svnrepo" &&
|
|
rm -rf import &&
|
|
|
|
svn_cmd co "$svnrepo/trunk" svn_project &&
|
|
(cd svn_project &&
|
|
echo "change1" >>subdir1/file &&
|
|
echo "change2" >>subdir2/file &&
|
|
echo "change3" >>subdir3/file &&
|
|
svn_cmd ci -m "change" .
|
|
) &&
|
|
|
|
svn_cmd cp -m "create mytag 1" -r2 "$svnrepo/trunk/subdir1" "$svnrepo/tags/mytag" &&
|
|
svn_cmd rm -m "delete mytag 1" "$svnrepo/tags/mytag" &&
|
|
svn_cmd cp -m "create mytag 2" -r2 "$svnrepo/trunk/subdir2" "$svnrepo/tags/mytag" &&
|
|
svn_cmd rm -m "delete mytag 2" "$svnrepo/tags/mytag" &&
|
|
svn_cmd cp -m "create mytag 3" -r2 "$svnrepo/trunk/subdir3" "$svnrepo/tags/mytag"
|
|
'
|
|
|
|
test_expect_success 'fetch deleted tags from same revision with no checksum error' '
|
|
git svn init --stdlayout "$svnrepo" git_project &&
|
|
cd git_project &&
|
|
git svn fetch &&
|
|
|
|
git diff --exit-code main:subdir3/file origin/tags/mytag:file &&
|
|
git diff --exit-code main:subdir2/file origin/tags/mytag^:file &&
|
|
git diff --exit-code main:subdir1/file origin/tags/mytag^^:file
|
|
'
|
|
|
|
test_done
|