Illustrate "filter" attribute with an example
[git/jrn.git] / t / t6013-rev-list-reverse-parents.sh
blob59fc2f06e0b5895af60b6eb4084fe7a38d3aa948
1 #!/bin/sh
3 test_description='--reverse combines with --parents'
5 . ./test-lib.sh
8 commit () {
9 test_tick &&
10 echo $1 > foo &&
11 git add foo &&
12 git commit -m "$1"
15 test_expect_success 'set up --reverse example' '
16 commit one &&
17 git tag root &&
18 commit two &&
19 git checkout -b side HEAD^ &&
20 commit three &&
21 git checkout master &&
22 git merge -s ours side &&
23 commit five
26 test_expect_success '--reverse --parents --full-history combines correctly' '
27 git rev-list --parents --full-history master -- foo |
28 perl -e "print reverse <>" > expected &&
29 git rev-list --reverse --parents --full-history master -- foo \
30 > actual &&
31 test_cmp actual expected
34 test_expect_success '--boundary does too' '
35 git rev-list --boundary --parents --full-history master ^root -- foo |
36 perl -e "print reverse <>" > expected &&
37 git rev-list --boundary --reverse --parents --full-history \
38 master ^root -- foo > actual &&
39 test_cmp actual expected
42 test_done