X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fgit-fsck-cache.txt;h=13f19653febee23a673fb87e0399fd65a3b29707;hb=3459c2c433ac46eac596810d2ef2c3d4ef949852;hp=c05b1bfd991c583afbe54d1fa2a8ffc010eaf283;hpb=2aef5bbae99aeba3551408eae13faea02bf55b67;p=git.git diff --git a/Documentation/git-fsck-cache.txt b/Documentation/git-fsck-cache.txt index c05b1bfd..13f19653 100644 --- a/Documentation/git-fsck-cache.txt +++ b/Documentation/git-fsck-cache.txt @@ -9,7 +9,7 @@ git-fsck-cache - Verifies the connectivity and validity of the objects in the da SYNOPSIS -------- -'git-fsck-cache' [--tags] [--root] [--delta-depth] [[--unreachable] [--cache] \*] +'git-fsck-cache' [--tags] [--root] [--unreachable] [--cache] [--standalone | --full] [--strict] [*] DESCRIPTION ----------- @@ -20,9 +20,12 @@ OPTIONS :: An object to treat as the head of an unreachability trace. + If no objects are given, git-fsck-cache defaults to using the + index file and all SHA1 references in .git/refs/* as heads. + --unreachable:: Print out objects that exist but that aren't readable from any - of the specified head nodes. + of the reference nodes. --root:: Report root nodes. @@ -34,8 +37,29 @@ OPTIONS Consider any object recorded in the cache also as a head node for an unreachability trace. ---delta-depth:: - Report back the length of the longest delta chain found. +--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 + and corresponding pack subdirectories in alternate + object pools; cannot be used with --standalone. + +--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 + objects that triggers this check, but it is recommended + to check new projects with this flag. It tests SHA1 and general object sanity, and it does full tracking of the resulting reachability and everything else. It prints out any @@ -45,11 +69,7 @@ that aren't readable from any of the specified head nodes. So for example - git-fsck-cache --unreachable $(cat .git/HEAD) - -or, for Cogito users: - - git-fsck-cache --unreachable $(cat .git/refs/heads/*) + git-fsck-cache --unreachable $(cat .git/HEAD .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 @@ -98,18 +118,18 @@ sha1 mismatch :: The database has an object who's sha1 doesn't match the database value. This indicates a serious data integrity problem. - (note: this error occured during early git development when - the database format changed.) Environment Variables --------------------- GIT_OBJECT_DIRECTORY:: - used to specify the object database root (usually .git/objects) + used to specify the object database root (usually $GIT_DIR/objects) GIT_INDEX_FILE:: - used to specify the cache + used to specify the index file of the cache +GIT_ALTERNATE_OBJECT_DIRECTORIES: + used to specify additional object database roots (usually unset) Author ------