]> git.ipfire.org Git - thirdparty/git.git/blame - t/t6013-rev-list-reverse-parents.sh
Merge branch 'wb/fsmonitor-bitmap-fix'
[thirdparty/git.git] / t / t6013-rev-list-reverse-parents.sh
CommitLineData
498bcd31
TR
1#!/bin/sh
2
3test_description='--reverse combines with --parents'
4
5. ./test-lib.sh
6
7
8commit () {
9 test_tick &&
10 echo $1 > foo &&
11 git add foo &&
12 git commit -m "$1"
13}
14
15test_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
24 '
25
26test_expect_success '--reverse --parents --full-history combines correctly' '
27 git rev-list --parents --full-history master -- foo |
94221d22 28 perl -e "print reverse <>" > expected &&
498bcd31
TR
29 git rev-list --reverse --parents --full-history master -- foo \
30 > actual &&
9c5b2fab 31 test_cmp expected actual
498bcd31
TR
32 '
33
34test_expect_success '--boundary does too' '
35 git rev-list --boundary --parents --full-history master ^root -- foo |
94221d22 36 perl -e "print reverse <>" > expected &&
498bcd31
TR
37 git rev-list --boundary --reverse --parents --full-history \
38 master ^root -- foo > actual &&
9c5b2fab 39 test_cmp expected actual
498bcd31
TR
40 '
41
42test_done