-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Junio C Hamano
committed
Jan 31, 2009
1 parent
a34a9db
commit 469e2eb
Showing
2 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/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 |