]> git.ipfire.org Git - thirdparty/git.git/blame - t/t6014-rev-list-all.sh
The third batch
[thirdparty/git.git] / t / t6014-rev-list-all.sh
CommitLineData
f0298cf1
JS
1#!/bin/sh
2
3test_description='--all includes detached HEADs'
4
b2e5d75d 5TEST_PASSES_SANITIZE_LEAK=true
f0298cf1
JS
6. ./test-lib.sh
7
8
9commit () {
10 test_tick &&
11 echo $1 > foo &&
12 git add foo &&
13 git commit -m "$1"
14}
15
16test_expect_success 'setup' '
17
18 commit one &&
19 commit two &&
20 git checkout HEAD^ &&
21 commit detached
22
23'
24
25test_expect_success 'rev-list --all lists detached HEAD' '
26
27 test 3 = $(git rev-list --all | wc -l)
28
29'
30
31test_expect_success 'repack does not lose detached HEAD' '
32
33 git gc &&
34 git prune --expire=now &&
35 git show HEAD
36
37'
38
695985f4
DJ
39test_expect_success 'rev-list --graph --no-walk is forbidden' '
40 test_must_fail git rev-list --graph --no-walk HEAD
41'
42
f0298cf1 43test_done