]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9167-git-svn-cmd-branch-subproject.sh
Merge branch 'tl/doc-cli-options-first'
[thirdparty/git.git] / t / t9167-git-svn-cmd-branch-subproject.sh
CommitLineData
f4f4c7fc
TS
1#!/bin/sh
2#
3# Copyright (c) 2013 Tobias Schulte
4#
5
6test_description='git svn branch for subproject clones'
9081a421
ÆAB
7
8TEST_PASSES_SANITIZE_LEAK=true
f4f4c7fc
TS
9. ./lib-git-svn.sh
10
11test_expect_success 'initialize svnrepo' '
12 mkdir import &&
13 (
14 cd import &&
15 mkdir -p trunk/project branches tags &&
16 (
17 cd trunk/project &&
18 echo foo > foo
19 ) &&
20 svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null
21 ) &&
22 rm -rf import &&
23 svn_cmd co "$svnrepo"/trunk/project trunk/project &&
24 (
25 cd trunk/project &&
26 echo bar >> foo &&
27 svn_cmd ci -m "updated trunk"
28 ) &&
29 rm -rf trunk
30'
31
32test_expect_success 'import into git' '
33 git svn init --trunk=trunk/project --branches=branches/*/project \
34 --tags=tags/*/project "$svnrepo" &&
35 git svn fetch &&
fe191fca 36 git checkout remotes/origin/trunk
f4f4c7fc
TS
37'
38
39test_expect_success 'git svn branch tests' '
40 test_must_fail git svn branch a &&
41 git svn branch --parents a &&
42 test_must_fail git svn branch -t tag1 &&
43 git svn branch --parents -t tag1 &&
44 test_must_fail git svn branch --tag tag2 &&
45 git svn branch --parents --tag tag2 &&
46 test_must_fail git svn tag tag3 &&
47 git svn tag --parents tag3
48'
49
50test_done