Merge tag 'v2.23.0-rc0' of git://git.kernel.org/pub/scm/git/git
[git/raj.git] / t / t9167-git-svn-cmd-branch-subproject.sh
blobba35fc06fcee2e2dad41db682b29ede932a2e96f
1 #!/bin/sh
3 # Copyright (c) 2013 Tobias Schulte
6 test_description='git svn branch for subproject clones'
7 . ./lib-git-svn.sh
9 test_expect_success 'initialize svnrepo' '
10 mkdir import &&
12 cd import &&
13 mkdir -p trunk/project branches tags &&
15 cd trunk/project &&
16 echo foo > foo
17 ) &&
18 svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null
19 ) &&
20 rm -rf import &&
21 svn_cmd co "$svnrepo"/trunk/project trunk/project &&
23 cd trunk/project &&
24 echo bar >> foo &&
25 svn_cmd ci -m "updated trunk"
26 ) &&
27 rm -rf trunk
30 test_expect_success 'import into git' '
31 git svn init --trunk=trunk/project --branches=branches/*/project \
32 --tags=tags/*/project "$svnrepo" &&
33 git svn fetch &&
34 git checkout remotes/origin/trunk
37 test_expect_success 'git svn branch tests' '
38 test_must_fail git svn branch a &&
39 git svn branch --parents a &&
40 test_must_fail git svn branch -t tag1 &&
41 git svn branch --parents -t tag1 &&
42 test_must_fail git svn branch --tag tag2 &&
43 git svn branch --parents --tag tag2 &&
44 test_must_fail git svn tag tag3 &&
45 git svn tag --parents tag3
48 test_done