Skip to content

Commit

Permalink
Merge branch 'jk/doc-fsck' into maint
Browse files Browse the repository at this point in the history
* jk/doc-fsck:
  docs: brush up obsolete bits of git-fsck manpage
  • Loading branch information
gitster committed Dec 28, 2011
2 parents 23838b8 + 2830308 commit 81eaa06
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions Documentation/git-fsck.txt
Expand Up @@ -72,30 +72,20 @@ index file, all SHA1 references in .git/refs/*, and all reflogs (unless
a blob, the contents are written into the file, rather than
its object name.

It tests SHA1 and general object sanity, and it does full tracking of
the resulting reachability and everything else. It prints out any
corruption it finds (missing or bad objects), and if you use the
'--unreachable' flag it will also print out objects that exist but
that aren't reachable from any of the specified head nodes.

So for example

git fsck --unreachable HEAD \
$(git for-each-ref --format="%(objectname)" refs/heads)
DISCUSSION
----------

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
sorted properly etc), but on the whole if 'git fsck' is happy, you
do have a valid tree.
git-fsck tests SHA1 and general object sanity, and it does full tracking
of the resulting reachability and everything else. It prints out any
corruption it finds (missing or bad objects), and if you use the
'--unreachable' flag it will also print out objects that exist but that
aren't reachable from any of the specified head nodes (or the default
set, as mentioned above).

Any corrupt objects you will have to find in backups or other archives
(i.e., you can just remove them and do an 'rsync' with some other site in
the hopes that somebody else has the object you have corrupted).

Of course, "valid tree" doesn't mean that it wasn't generated by some
evil person, and the end result might be crap. git is a revision
tracking system, not a quality assurance system ;)

Extracted Diagnostics
---------------------

Expand Down

0 comments on commit 81eaa06

Please sign in to comment.