summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heidelberg <markus.heidelberg@web.de>2008-12-21 16:30:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-12-21 20:04:12 (GMT)
commit27c03aafdf29736f889c56777426066c74fa115d (patch)
tree3f8840dee3f18c6956e12b44daa19d15b87f4371
parent718258e256b74622aa55f5ee0cb9cff4cce6bf9f (diff)
downloadgit-27c03aafdf29736f889c56777426066c74fa115d.zip
git-27c03aafdf29736f889c56777426066c74fa115d.tar.gz
git-27c03aafdf29736f889c56777426066c74fa115d.tar.bz2
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>
-rw-r--r--Documentation/git-fsck.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt
index d5a7647..287c4fc 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