From: Markus Heidelberg Date: Sun, 21 Dec 2008 16:30:22 +0000 (+0100) Subject: doc/git-fsck: change the way for getting heads' SHA1s X-Git-Tag: v1.6.1-rc4~3^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=27c03aafdf29736f889c56777426066c74fa115d;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt index d5a764721..287c4fc5e 100644 --- a/Documentation/git-fsck.txt +++ b/Documentation/git-fsck.txt @@ -79,7 +79,8 @@ that aren't readable from any of the specified head nodes. So for example - git fsck --unreachable HEAD $(cat .git/refs/heads/*) + git fsck --unreachable HEAD \ + $(git for-each-ref --format="%(objectname)" refs/heads) will do quite a _lot_ of verification on the tree. There are a few extra validity tests to be added (make sure that tree objects are