Merge branch 'lo/repo-info-step-2'

"repo info" learns a short-hand option "-z" that is the same as
"--format=nul", and learns to report the objects format used in the
repository.

* lo/repo-info-step-2:
  repo: add the field objects.format
  repo: add the flag -z as an alias for --format=nul
This commit is contained in:
Junio C Hamano
2025-09-15 08:52:05 -07:00
3 changed files with 58 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ git-repo - Retrieve information about the repository
SYNOPSIS
--------
[synopsis]
git repo info [--format=(keyvalue|nul)] [<key>...]
git repo info [--format=(keyvalue|nul)] [-z] [<key>...]
DESCRIPTION
-----------
@@ -18,7 +18,7 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
COMMANDS
--------
`info [--format=(keyvalue|nul)] [<key>...]`::
`info [--format=(keyvalue|nul)] [-z] [<key>...]`::
Retrieve metadata-related information about the current repository. Only
the requested data will be returned based on their keys (see "INFO KEYS"
section below).
@@ -40,6 +40,8 @@ supported:
between the key and the value and using a NUL character after each value.
This format is better suited for being parsed by another applications than
`keyvalue`. Unlike in the `keyvalue` format, the values are never quoted.
+
`-z` is an alias for `--format=nul`.
INFO KEYS
---------
@@ -53,6 +55,9 @@ values that they return:
`layout.shallow`::
`true` if this is a shallow repository, otherwise `false`.
`object.format`::
The object format (hash algorithm) used in the repository.
`references.format`::
The reference storage format. The valid values are:
+