1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-18 15:04:49 +01:00
git/t/t6009-rev-list-parent.sh

39 lines
531 B
Bash
Raw Normal View History

#!/bin/sh
test_description='properly cull all ancestors'
. ./test-lib.sh
commit () {
test_tick &&
echo $1 >file &&
git commit -a -m $1 &&
git tag $1
}
test_expect_success setup '
touch file &&
git add file &&
commit one &&
test_tick=$(($test_tick - 2400))
commit two &&
commit three &&
commit four &&
git log --pretty=oneline --abbrev-commit
'
test_expect_success 'one is ancestor of others and should not be shown' '
git rev-list one --not four >result &&
>expect &&
test_cmp expect result
'
test_done