{"thread":{"id":"16821","subject":"[PATCH] doc/git-fsck: change the way for getting heads' SHA1s","startedAt":"2008-12-21T16:30:22Z","lastAt":"2008-12-21T16:30:22Z","messageCount":1,"participants":["Markus Heidelberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"98493","messageId":"200812211730.22466.markus.heidelberg@web.de","threadId":"16821","inReplyTo":null,"subject":"[PATCH] doc/git-fsck: change the way for getting heads' SHA1s","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2008-12-21T16:30:22Z","receivedAt":"2008-12-21T16:30:22Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"The straightforward way with using 'cat .git/refs/heads/*' doesn't work\nwith packed refs as well as branches of the form topic/topic1. So let's\nuse git-for-each-ref for getting the heads' SHA1s in this example.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n Documentation/git-fsck.txt |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt\nindex d5a7647..287c4fc 100644\n--- a/Documentation/git-fsck.txt\n+++ b/Documentation/git-fsck.txt\n@@ -79,7 +79,8 @@ that aren't readable from any of the specified head nodes.\n \n So for example\n \n-\tgit fsck --unreachable HEAD $(cat .git/refs/heads/*)\n+\tgit fsck --unreachable HEAD \\\n+\t\t$(git for-each-ref --format=\"%(objectname)\" refs/heads)\n \n will do quite a _lot_ of verification on the tree. There are a few\n extra validity tests to be added (make sure that tree objects are\n-- \n1.6.1.rc3.54.g7bef0\n"}]}