@@ -81,30 +81,20 @@ index file, all SHA1 references in .git/refs/*, and all reflogs (unless
81
81
progress status even if the standard error stream is not
82
82
directed to a terminal.
83
83
84
- It tests SHA1 and general object sanity, and it does full tracking of
85
- the resulting reachability and everything else. It prints out any
86
- corruption it finds (missing or bad objects), and if you use the
87
- '--unreachable' flag it will also print out objects that exist but
88
- that aren't reachable from any of the specified head nodes.
89
-
90
- So for example
91
-
92
- git fsck --unreachable HEAD \
93
- $(git for-each-ref --format="%(objectname)" refs/heads)
84
+ DISCUSSION
85
+ ----------
94
86
95
- will do quite a _lot_ of verification on the tree. There are a few
96
- extra validity tests to be added (make sure that tree objects are
97
- sorted properly etc), but on the whole if 'git fsck' is happy, you
98
- do have a valid tree.
87
+ git-fsck tests SHA1 and general object sanity, and it does full tracking
88
+ of the resulting reachability and everything else. It prints out any
89
+ corruption it finds (missing or bad objects), and if you use the
90
+ '--unreachable' flag it will also print out objects that exist but that
91
+ aren't reachable from any of the specified head nodes (or the default
92
+ set, as mentioned above).
99
93
100
94
Any corrupt objects you will have to find in backups or other archives
101
95
(i.e., you can just remove them and do an 'rsync' with some other site in
102
96
the hopes that somebody else has the object you have corrupted).
103
97
104
- Of course, "valid tree" doesn't mean that it wasn't generated by some
105
- evil person, and the end result might be crap. git is a revision
106
- tracking system, not a quality assurance system ;)
107
-
108
98
Extracted Diagnostics
109
99
---------------------
110
100
0 commit comments