mirror of
https://github.com/git/git.git
synced 2024-12-04 23:44:14 +08:00
469e2ebf63
By default we looked at all refs but not HEAD. The only thing that made fsck not lose sight of commits that are only reachable from a detached HEAD was the reflog for the HEAD. This fixes it, with a new test. Signed-off-by: Junio C Hamano <gitster@pobox.com>
20 lines
340 B
Bash
Executable File
20 lines
340 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='git fsck random collection of tests'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success setup '
|
|
test_commit A fileA one &&
|
|
git checkout HEAD^0 &&
|
|
test_commit B fileB two &&
|
|
git tag -d A B &&
|
|
git reflog expire --expire=now --all
|
|
'
|
|
|
|
test_expect_success 'HEAD is part of refs' '
|
|
test 0 = $(git fsck | wc -l)
|
|
'
|
|
|
|
test_done
|