changed added/conflicted checking order
[git/mingw/4msysgit/wingit-dll.git] / t / t9133-git-svn-nested-git-repo.sh
blob893f57ef7370a5078cce39ef7f4136342451f655
1 #!/bin/sh
3 # Copyright (c) 2009 Eric Wong
6 test_description='git svn property tests'
7 . ./lib-git-svn.sh
9 test_expect_success 'setup repo with a git repo inside it' '
10 svn co "$svnrepo" s &&
12 cd s &&
13 git init &&
14 test -f .git/HEAD &&
15 > .git/a &&
16 echo a > a &&
17 svn add .git a &&
18 svn commit -m "create a nested git repo" &&
19 svn up &&
20 echo hi >> .git/a &&
21 svn commit -m "modify .git/a" &&
22 svn up
26 test_expect_success 'clone an SVN repo containing a git repo' '
27 git svn clone "$svnrepo" g &&
28 echo a > expect &&
29 test_cmp expect g/a
32 test_expect_success 'SVN-side change outside of .git' '
34 cd s &&
35 echo b >> a &&
36 svn commit -m "SVN-side change outside of .git" &&
37 svn up &&
38 svn log -v | fgrep "SVN-side change outside of .git"
42 test_expect_success 'update git svn-cloned repo' '
44 cd g &&
45 git svn rebase &&
46 echo a > expect &&
47 echo b >> expect &&
48 test_cmp a expect &&
49 rm expect
53 test_expect_success 'SVN-side change inside of .git' '
55 cd s &&
56 git add a &&
57 git commit -m "add a inside an SVN repo" &&
58 git log &&
59 svn add --force .git &&
60 svn commit -m "SVN-side change inside of .git" &&
61 svn up &&
62 svn log -v | fgrep "SVN-side change inside of .git"
66 test_expect_success 'update git svn-cloned repo' '
68 cd g &&
69 git svn rebase &&
70 echo a > expect &&
71 echo b >> expect &&
72 test_cmp a expect &&
73 rm expect
77 test_expect_success 'SVN-side change in and out of .git' '
79 cd s &&
80 echo c >> a &&
81 git add a &&
82 git commit -m "add a inside an SVN repo" &&
83 svn commit -m "SVN-side change in and out of .git" &&
84 svn up &&
85 svn log -v | fgrep "SVN-side change in and out of .git"
89 test_expect_success 'update git svn-cloned repo again' '
91 cd g &&
92 git svn rebase &&
93 echo a > expect &&
94 echo b >> expect &&
95 echo c >> expect &&
96 test_cmp a expect &&
97 rm expect
101 test_done