git-lfs/docs/man/git-lfs-fsck.1.ronn
brian m. carlson e6c9d1de19
commands/fsck: allow scanning revision ranges
Currently, git lfs fsck operates only on the HEAD and index.  For
objects, this is usually the right decision, since only objects for HEAD
are checked out.

However, for pointers, this may not be desired.  A user may want to
check pointers for a range of commits, such as during a CI job.  To deal
with these cases, let a user specify a revision or a simple range of
revisions to operate on, and process those revisions.

Note that we don't currently process the index with --pointers because
this requires a completely different set of scanners which are not yet
implemented.  We can implement such a feature in a future revision if
desired.

In the tests, refactor out our setup code into a function for reuse in
multiple tests.
2021-07-14 18:16:51 +00:00

35 lines
961 B
Markdown

git-lfs-fsck(1) -- Check GIT LFS files for consistency
======================================================
## SYNOPSIS
`git lfs fsck` [options] [revisions]
## DESCRIPTION
Checks all GIT LFS files in the current HEAD for consistency.
Corrupted files are moved to ".git/lfs/bad".
The revisions may be specified as either a single committish, in which case only
that commit is inspected; specified as a range of the form `A..B` (and only this
form), in which case that range is inspected; or omitted entirely, in which case
HEAD (and, for --objects, the index) is examined.
The default is to perform all checks.
## OPTIONS
* `--objects`:
Check that each object in HEAD matches its expected hash and that each object
exists on disk.
* `--pointers`:
Check that each pointer is canonical and that each file which should be stored
as a Git LFS file is so stored.
## SEE ALSO
git-lfs-ls-files(1), git-lfs-status(1).
Part of the git-lfs(1) suite.