ident: do not drop username when reading from /etc/mailname
[git/jnareb-git.git] / t / t6013-rev-list-reverse-parents.sh
blob892a537989fd7e877f698925fb0a8a33a1e20939
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_PATH" -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_PATH" -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