git-lfs/docs/man/git-lfs-pointer.1.ronn
brian m. carlson 552f7073af
commands/pointer: add an option for strict checking
Currently we process pointers in a rather lax way and accept a variety
of non-canonical pointers, such as those with CRLF line endings or a
size value of 0 (which should be an empty file instead).  However, we
have a flag to indicate whether the pointer is canonical when parsing
it, so let's add a --strict flag so that we can allow people to reject
non-canonical pointers.

Note that while strictness is not the default, we add a --no-strict flag
as well so we can allow people to use it now and change the default at a
later time (probably 4.0).
2021-07-14 18:12:07 +00:00

45 lines
1.4 KiB
Markdown

git-lfs-pointer(1) -- Build, compare, and check pointers
========================================================
## SYNOPSIS
`git lfs pointer --file=path/to/file`<br>
`git lfs pointer --file=path/to/file --pointer=path/to/pointer`<br>
`git lfs pointer --file=path/to/file --stdin`
`git lfs pointer --check --file=path/to/file`
## Description
Builds and optionally compares generated pointer files to ensure consistency
between different Git LFS implementations.
## OPTIONS
* `--file`:
A local file to build the pointer from.
* `--pointer`:
A local file including the contents of a pointer generated from another
implementation. This is compared to the pointer generated from `--file`.
* `--stdin`:
Reads the pointer from STDIN to compare with the pointer generated from
`--file`.
* `--check`:
Reads the pointer from STDIN (if `--stdin` is given) or the filepath (if
`--file`) is given. If neither or both of `--stdin` and `--file` are given,
the invocation is invalid. Exits 0 if the data read is a valid Git LFS
pointer. Exits 1 otherwise.
* `--strict`:
* `--no-strict`:
In conjunction with `--check`, `--strict` verifies that the pointer is
canonical; that is, it would be the one created by Git LFS. If it is not,
exits 2. The default, for backwards compatibility, is `--no-strict`, but
this may change in a future version.
## SEE ALSO
Part of the git-lfs(1) suite.