@matheusbsbs / matheus-bagliano / commits / 27c03aafdf
Fork 0

doc/git-fsck: change the way for getting heads' SHA1s

The straightforward way with using 'cat .git/refs/heads/*' doesn't work with packed refs as well as branches of the form topic/topic1. So let's use git-for-each-ref for getting the heads' SHA1s in this example. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Markus Heidelberg committed Dec 21, 2008 at 17:30 UTC 27c03aafdf29736f889c56777426066c74fa115d
1 file changed +2 -1
Documentation/git-fsck.txt
+2 -1
@@ -79,7 +79,8 @@ that aren't readable from any of the specified head nodes.
79
80 So for example
81
82 - git fsck --unreachable HEAD $(cat .git/refs/heads/*)
82 + git fsck --unreachable HEAD \
83 + $(git for-each-ref --format="%(objectname)" refs/heads)
84
85 will do quite a _lot_ of verification on the tree. There are a few
86 extra validity tests to be added (make sure that tree objects are