2008-02-03 08:47:22 +01:00
|
|
|
#!/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 &&
|
|
|
|
|
2010-10-31 02:46:54 +01:00
|
|
|
test_tick=$(($test_tick - 2400)) &&
|
2008-02-03 08:47:22 +01:00
|
|
|
|
|
|
|
commit two &&
|
|
|
|
commit three &&
|
|
|
|
commit four &&
|
|
|
|
|
|
|
|
git log --pretty=oneline --abbrev-commit
|
|
|
|
'
|
|
|
|
|
2008-03-18 02:56:33 +01:00
|
|
|
test_expect_success 'one is ancestor of others and should not be shown' '
|
2008-02-03 08:47:22 +01:00
|
|
|
|
|
|
|
git rev-list one --not four >result &&
|
|
|
|
>expect &&
|
2008-03-12 22:36:36 +01:00
|
|
|
test_cmp expect result
|
2008-02-03 08:47:22 +01:00
|
|
|
|
|
|
|
'
|
|
|
|
|
|
|
|
test_done
|