3 test_description='test for rev-list --except'
7 test_expect_success 'setup' '
12 git checkout -b test master &&
14 git commit -a -m two &&
15 git checkout -b merge master &&
19 test_expect_success 'rev-list --except' '
21 git rev-list --topo-order --branches --except merge > actual &&
22 git rev-list --topo-order test > expect &&
23 test_cmp expect actual
26 test_expect_success 'rev-list --except with extra' '
28 echo three > content &&
29 git commit -a -m three &&
30 git rev-list --topo-order --branches --except merge > actual &&
31 git rev-list --topo-order test > expect &&
32 test_cmp expect actual
35 test_expect_success 'rev-list --except with full ref' '
37 git rev-list --topo-order --branches --except refs/heads/merge > actual &&
38 git rev-list --topo-order test > expect &&
39 test_cmp expect actual
42 test_expect_success 'rev-list --except and --not' '
44 git rev-list --topo-order test --not master --except master > actual &&
45 git rev-list --topo-order test > expect &&
46 test_cmp expect actual
49 test_expect_success 'rev-list --except and --not with proper flags' '
51 git checkout -b maint master &&
52 git checkout -b next test &&
53 echo four > content &&
54 git commit -a -m four &&
55 git rev-list --topo-order next --not master maint --except maint > actual &&
56 git rev-list --topo-order next --not master > expect &&
57 test_cmp expect actual
60 test_expect_success 'rev-list --not ranges' '
62 git rev-list --topo-order test --not master --except master test > actual &&
63 git rev-list --topo-order test > expect &&
64 test_cmp expect actual
67 test_expect_success 'rev-list multiple --not ranges' '
69 git checkout -b extra test &&
70 echo five > content &&
71 git commit -a -m five &&
72 git rev-list --topo-order test --not master --except master test --not extra > actual &&
73 git rev-list --topo-order test extra > expect &&
74 test_cmp expect actual