Merge branch 'jk/refresh-porcelain-output' into maint
[alt-git.git] / t / t6014-rev-list-all.sh
blob991ab4a65bc10b3b2a0f82feaa4873142439ba8b
1 #!/bin/sh
3 test_description='--all includes detached HEADs'
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 'setup' '
17 commit one &&
18 commit two &&
19 git checkout HEAD^ &&
20 commit detached
24 test_expect_success 'rev-list --all lists detached HEAD' '
26 test 3 = $(git rev-list --all | wc -l)
30 test_expect_success 'repack does not lose detached HEAD' '
32 git gc &&
33 git prune --expire=now &&
34 git show HEAD
38 test_done