diff options
| author | brian m. carlson <sandals@crustytoothpaste.net> | 2025-10-09 21:56:23 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-09 17:46:14 -0700 |
| commit | b95c59e21e6afeddc56400e162e818a9312f04d2 (patch) | |
| tree | 040fea1673e4ad558b59c87b3a21bbecbc4dc94a /Documentation/git-rev-parse.adoc | |
| parent | d4f439548d46dd93087af8d9ff2e9f7e4d5e98bb (diff) | |
| download | git-b95c59e21e6afeddc56400e162e818a9312f04d2.tar.xz | |
rev-parse: allow printing compatibility hash
Right now, we have a way to print the storage hash, the input hash, and
the output hash, but we lack a way to print the compatibility hash. Add
a new type to --show-object-format, compat, which prints this value.
If no compatibility hash exists, simply print a newline. This is
important to allow users to use multiple options at once while still
getting unambiguous output.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.adoc')
| -rw-r--r-- | Documentation/git-rev-parse.adoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/git-rev-parse.adoc b/Documentation/git-rev-parse.adoc index cc32b4b4f0..465ae3e29d 100644 --- a/Documentation/git-rev-parse.adoc +++ b/Documentation/git-rev-parse.adoc @@ -324,11 +324,12 @@ The following options are unaffected by `--path-format`: path of the current directory relative to the top-level directory. ---show-object-format[=(storage|input|output)]:: - Show the object format (hash algorithm) used for the repository - for storage inside the `.git` directory, input, or output. For - input, multiple algorithms may be printed, space-separated. - If not specified, the default is "storage". +--show-object-format[=(storage|input|output|compat)]:: + Show the object format (hash algorithm) used for the repository for storage + inside the `.git` directory, input, output, or compatibility. For input, + multiple algorithms may be printed, space-separated. If `compat` is + requested and no compatibility algorithm is enabled, prints an empty line. If + not specified, the default is "storage". --show-ref-format:: Show the reference storage format used for the repository. |
