parse-options: do not infer PARSE_OPT_NOARG from option type
[git/srabbelier.git] / t / t9157-git-svn-fetch-merge.sh
blobda582c53825a5719f6c9d82983e0951afcccd0df
1 #!/bin/sh
3 # Copyright (c) 2010 Steven Walter
6 test_description='git svn merge detection'
7 . ./lib-git-svn.sh
9 test_expect_success 'initialize source svn repo' '
10 svn_cmd mkdir -m x "$svnrepo"/trunk &&
11 svn_cmd mkdir -m x "$svnrepo"/branches &&
12 svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
14 cd "$SVN_TREE" &&
15 touch foo &&
16 svn add foo &&
17 svn commit -m "initial commit" &&
18 svn cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch1 &&
19 touch bar &&
20 svn add bar &&
21 svn commit -m x &&
22 svn cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch2 &&
23 svn switch "$svnrepo"/branches/branch1 &&
24 touch baz &&
25 svn add baz &&
26 svn commit -m x &&
27 svn switch "$svnrepo"/trunk &&
28 svn merge "$svnrepo"/branches/branch1 &&
29 svn commit -m "merge" &&
30 svn switch "$svnrepo"/branches/branch1 &&
31 svn commit -m x &&
32 svn switch "$svnrepo"/branches/branch2 &&
33 svn merge "$svnrepo"/branches/branch1 &&
34 svn commit -m "merge branch1" &&
35 svn switch "$svnrepo"/trunk &&
36 svn merge "$svnrepo"/branches/branch2 &&
37 svn resolved baz &&
38 svn commit -m "merge branch2"
39 ) &&
40 rm -rf "$SVN_TREE"
43 test_expect_success 'clone svn repo' '
44 git svn init -s "$svnrepo" &&
45 git svn fetch
48 test_expect_success 'verify merge commit' 'git rev-parse HEAD^2'
50 test_done