mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Add a new flag `--all` to git-repo-info for requesting values for all the available keys. By using this flag, the user can retrieve all the values instead of searching what are the desired keys for what they wants. Helped-by: Karthik Nayak <karthik.188@gmail.com> Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
120 lines
3.4 KiB
Plaintext
120 lines
3.4 KiB
Plaintext
git-repo(1)
|
|
===========
|
|
|
|
NAME
|
|
----
|
|
git-repo - Retrieve information about the repository
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[synopsis]
|
|
git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]
|
|
git repo structure [--format=(table|keyvalue|nul)]
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
Retrieve information about the repository.
|
|
|
|
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
|
|
|
|
COMMANDS
|
|
--------
|
|
`info [--format=(keyvalue|nul)] [-z] [--all | <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).
|
|
+
|
|
The values are returned in the same order in which their respective keys were
|
|
requested. The `--all` flag requests the values for all the available keys.
|
|
+
|
|
The output format can be chosen through the flag `--format`. Two formats are
|
|
supported:
|
|
+
|
|
`keyvalue`:::
|
|
output key-value pairs one per line using the `=` character as
|
|
the delimiter between the key and the value. Values containing "unusual"
|
|
characters are quoted as explained for the configuration variable
|
|
`core.quotePath` (see linkgit:git-config[1]). This is the default.
|
|
|
|
`nul`:::
|
|
similar to `keyvalue`, but using a newline character as the delimiter
|
|
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`.
|
|
|
|
`structure [--format=(table|keyvalue|nul)]`::
|
|
Retrieve statistics about the current repository structure. The
|
|
following kinds of information are reported:
|
|
+
|
|
* Reference counts categorized by type
|
|
* Reachable object counts categorized by type
|
|
|
|
+
|
|
The output format can be chosen through the flag `--format`. Three formats are
|
|
supported:
|
|
+
|
|
`table`:::
|
|
Outputs repository stats in a human-friendly table. This format may
|
|
change and is not intended for machine parsing. This is the default
|
|
format.
|
|
|
|
`keyvalue`:::
|
|
Each line of output contains a key-value pair for a repository stat.
|
|
The '=' character is used to delimit between the key and the value.
|
|
Values containing "unusual" characters are quoted as explained for the
|
|
configuration variable `core.quotePath` (see linkgit:git-config[1]).
|
|
|
|
`nul`:::
|
|
Similar to `keyvalue`, but uses a NUL character to delimit between
|
|
key-value pairs instead of a newline. Also uses a newline character as
|
|
the delimiter between the key and value instead of '='. Unlike the
|
|
`keyvalue` format, values containing "unusual" characters are never
|
|
quoted.
|
|
|
|
INFO KEYS
|
|
---------
|
|
In order to obtain a set of values from `git repo info`, you should provide
|
|
the keys that identify them. Here's a list of the available keys and the
|
|
values that they return:
|
|
|
|
`layout.bare`::
|
|
`true` if this is a bare repository, otherwise `false`.
|
|
|
|
`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:
|
|
+
|
|
include::ref-storage-format.adoc[]
|
|
|
|
EXAMPLES
|
|
--------
|
|
|
|
* Retrieves the reference format of the current repository:
|
|
+
|
|
------------
|
|
git repo info references.format
|
|
------------
|
|
+
|
|
|
|
* Retrieves whether the current repository is bare and whether it is shallow
|
|
using the `nul` format:
|
|
+
|
|
------------
|
|
git repo info --format=nul layout.bare layout.shallow
|
|
------------
|
|
|
|
SEE ALSO
|
|
--------
|
|
linkgit:git-rev-parse[1]
|
|
|
|
GIT
|
|
---
|
|
Part of the linkgit:git[1] suite
|