mailmap: plug memory leak in read_mailmap_blob()
[git/gitster.git] / t / t6014-rev-list-all.sh
blob16b8bd1d090eae0449e409cd8313ffd45f769208
1 #!/bin/sh
3 test_description='--all includes detached HEADs'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
9 commit () {
10 test_tick &&
11 echo $1 > foo &&
12 git add foo &&
13 git commit -m "$1"
16 test_expect_success 'setup' '
18 commit one &&
19 commit two &&
20 git checkout HEAD^ &&
21 commit detached
25 test_expect_success 'rev-list --all lists detached HEAD' '
27 test 3 = $(git rev-list --all | wc -l)
31 test_expect_success 'repack does not lose detached HEAD' '
33 git gc &&
34 git prune --expire=now &&
35 git show HEAD
39 test_expect_success 'rev-list --graph --no-walk is forbidden' '
40 test_must_fail git rev-list --graph --no-walk HEAD
43 test_done