X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Documentation%2Fgit-fsck-objects.txt;h=d0af99d3512d3794f9907612cef1d30616120064;hb=162f41292167a800432fc6bbacfcd9f93a90b0c8;hp=8f76acf1611d59a857f9ddbf2633756f7d1a3184;hpb=98438bd0e893c23186fb82ea8b04964c0f1ef9d1;p=git.git diff --git a/Documentation/git-fsck-objects.txt b/Documentation/git-fsck-objects.txt index 8f76acf1..d0af99d3 100644 --- a/Documentation/git-fsck-objects.txt +++ b/Documentation/git-fsck-objects.txt @@ -8,7 +8,9 @@ git-fsck-objects - Verifies the connectivity and validity of the objects in the SYNOPSIS -------- -'git-fsck-objects' [--tags] [--root] [--unreachable] [--cache] [--standalone | --full] [--strict] [*] +[verse] +'git-fsck-objects' [--tags] [--root] [--unreachable] [--cache] + [--full] [--strict] [*] DESCRIPTION ----------- @@ -33,30 +35,23 @@ index file and all SHA1 references in .git/refs/* as heads. Report tags. --cache:: - Consider any object recorded in the cache also as a head node for + Consider any object recorded in the index also as a head node for an unreachability trace. ---standalone:: - Limit checks to the contents of GIT_OBJECT_DIRECTORY - ($GIT_DIR/objects), making sure that it is consistent and - complete without referring to objects found in alternate - object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES, - nor packed GIT archives found in $GIT_DIR/objects/pack; - cannot be used with --full. - --full:: Check not just objects in GIT_OBJECT_DIRECTORY ($GIT_DIR/objects), but also the ones found in alternate - object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES, - and in packed GIT archives found in $GIT_DIR/objects/pack + object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES + or $GIT_DIR/objects/info/alternates, + and in packed git archives found in $GIT_DIR/objects/pack and corresponding pack subdirectories in alternate - object pools; cannot be used with --standalone. + object pools. --strict:: Enable more strict checking, namely to catch a file mode recorded with g+w bit set, which was created by older - versions of GIT. Existing repositories, including the - Linux kernel, GIT itself, and sparse repository have old + versions of git. Existing repositories, including the + Linux kernel, git itself, and sparse repository have old objects that triggers this check, but it is recommended to check new projects with this flag. @@ -68,7 +63,7 @@ that aren't readable from any of the specified head nodes. So for example - git-fsck-objects --unreachable $(cat .git/HEAD .git/refs/heads/*) + git-fsck-objects --unreachable HEAD $(cat .git/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 @@ -76,11 +71,11 @@ sorted properly etc), but on the whole if "git-fsck-objects" is happy, you do have a valid tree. Any corrupt objects you will have to find in backups or other archives -(ie you can just remove them and do an "rsync" with some other site in +(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 +evil person, and the end result might be crap. git is a revision tracking system, not a quality assurance system ;) Extracted Diagnostics @@ -125,7 +120,7 @@ GIT_OBJECT_DIRECTORY:: used to specify the object database root (usually $GIT_DIR/objects) GIT_INDEX_FILE:: - used to specify the index file of the cache + used to specify the index file of the index GIT_ALTERNATE_OBJECT_DIRECTORIES:: used to specify additional object database roots (usually unset)