Commit | Line | Data |
---|---|---|
07576208 JS |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2010 Jay Soffian | |
4 | # | |
5 | ||
6 | test_description='git svn fancy glob test' | |
7 | ||
8 | . ./lib-git-svn.sh | |
9 | ||
10 | test_expect_success 'load svn repo' " | |
11 | svnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9154/svn.dump' && | |
12 | git svn init --minimize-url -T trunk '$svnrepo' && | |
13 | git svn fetch | |
14 | " | |
15 | ||
16 | test_expect_success 'add red branch' " | |
17 | git config svn-remote.svn.branches 'branches/{red}:refs/remotes/*' && | |
18 | git svn fetch && | |
19 | git rev-parse refs/remotes/red && | |
20 | test_must_fail git rev-parse refs/remotes/green && | |
21 | test_must_fail git rev-parse refs/remotes/blue | |
22 | " | |
23 | ||
9478b119 | 24 | test_expect_success 'add gre branch' " |
f7e87141 | 25 | git config --file=.git/svn/.metadata --unset svn-remote.svn.branches-maxRev && |
9478b119 AR |
26 | git config svn-remote.svn.branches 'branches/{red,gre}:refs/remotes/*' && |
27 | git svn fetch && | |
28 | git rev-parse refs/remotes/red && | |
29 | test_must_fail git rev-parse refs/remotes/green && | |
30 | test_must_fail git rev-parse refs/remotes/blue | |
31 | " | |
32 | ||
07576208 | 33 | test_expect_success 'add green branch' " |
f7e87141 | 34 | git config --file=.git/svn/.metadata --unset svn-remote.svn.branches-maxRev && |
07576208 JS |
35 | git config svn-remote.svn.branches 'branches/{red,green}:refs/remotes/*' && |
36 | git svn fetch && | |
37 | git rev-parse refs/remotes/red && | |
38 | git rev-parse refs/remotes/green && | |
39 | test_must_fail git rev-parse refs/remotes/blue | |
40 | " | |
41 | ||
42 | test_expect_success 'add all branches' " | |
f7e87141 | 43 | git config --file=.git/svn/.metadata --unset svn-remote.svn.branches-maxRev && |
07576208 JS |
44 | git config svn-remote.svn.branches 'branches/*:refs/remotes/*' && |
45 | git svn fetch && | |
46 | git rev-parse refs/remotes/red && | |
47 | git rev-parse refs/remotes/green && | |
48 | git rev-parse refs/remotes/blue | |
49 | " | |
50 | ||
51 | test_done |