interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / git-repo.adoc

157 lines · 4841 bytes Raw Blame History
1git-repo(1)
2===========
3
4NAME
5----
6git-repo - Retrieve information about the repository
7
8SYNOPSIS
9--------
10[synopsis]
11git repo info [--format=(lines|nul) | -z] [--all | <key>...]
12git repo info --keys [--format=(lines|nul) | -z]
13git repo structure [--format=(table|lines|nul) | -z]
14
15DESCRIPTION
16-----------
17Retrieve information about the repository.
18
19THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
20
21COMMANDS
22--------
23`info [--format=(lines|nul) | -z] [--all | <key>...]`::
24 Retrieve metadata-related information about the current repository. Only
25 the requested data will be returned based on their keys
26 (see <<INFO_KEYS,"INFO KEYS">> section below).
27+
28The values are returned in the same order in which their respective keys were
29requested. The `--all` flag requests the values for all the available keys.
30+
31The output format can be chosen through the flag `--format`. Two formats are
32supported:
33+
34
35`lines`:::
36 Output key-value pairs one per line using the `=` character as
37 the delimiter between the key and the value. Values containing "unusual"
38 characters are quoted as explained for the configuration variable
39 `core.quotePath` (see linkgit:git-config[1]). This is the default.
40
41`nul`:::
42 Similar to `lines`, but using a newline character as the delimiter
43 between the key and the value and using a _NUL_ character after each value.
44 This format is better suited for being parsed by another applications than
45 `lines`. Unlike in the `lines` format, the values are never quoted.
46+
47`-z` is an alias for `--format=nul`.
48
49`info --keys [--format=(lines|nul) | -z]`::
50 List all the available keys, one per line. The output format can be chosen
51 through the flag `--format`. The following formats are supported:
52+
53`lines`:::
54 Output the keys one per line. This is the default.
55
56`nul`:::
57 Similar to `lines`, but using a _NUL_ character after each value.
58
59`structure [--format=(table|lines|nul) | -z]`::
60 Retrieve statistics about the current repository structure. The
61 following kinds of information are reported:
62+
63* Reference counts categorized by type
64* Reachable object counts categorized by type
65* Total inflated size of reachable objects by type
66* Total disk size of reachable objects by type
67* Largest reachable objects in the repository by type
68+
69The output format can be chosen through the flag `--format`. Three formats are
70supported:
71+
72`table`:::
73 Outputs repository stats in a human-friendly table. This format may
74 change and is not intended for machine parsing. This is the default
75 format.
76
77`lines`:::
78 Each line of output contains a key-value pair for a repository stat.
79 The '=' character is used to delimit between the key and the value.
80 Values containing "unusual" characters are quoted as explained for the
81 configuration variable `core.quotePath` (see linkgit:git-config[1]).
82
83`nul`:::
84 Similar to `lines`, but uses a _NUL_ character to delimit between
85 key-value pairs instead of a newline. Also uses a newline character as
86 the delimiter between the key and value instead of '='. Unlike the
87 `lines` format, values containing "unusual" characters are never
88 quoted.
89+
90`-z` is an alias for `--format=nul`.
91
92[[INFO_KEYS]]
93INFO KEYS
94---------
95In order to obtain a set of values from `git repo info`, you should provide
96the keys that identify them. Here's a list of the available keys and the
97values that they return:
98
99`layout.bare`::
100 `true` if this is a bare repository, otherwise `false`.
101
102`layout.shallow`::
103 `true` if this is a shallow repository, otherwise `false`.
104
105`object.format`::
106 The object format (hash algorithm) used in the repository.
107
108`objects.storageFormat`::
109 The object storage format used in the repository, as configured via
110 `extensions.objectStorage`. The valid values are:
111+
112include::object-storage-format.adoc[]
113
114`path.commondir.absolute`::
115 The canonical absolute path to the Git repository's common
116 directory (the shared `.git` directory containing objects,
117 refs, and global configuration).
118
119`path.commondir.relative`::
120 The path to the Git repository's common directory relative to
121 the current working directory.
122
123`path.gitdir.absolute`::
124 The canonical absolute path to the Git repository directory (the `.git` directory).
125
126`path.gitdir.relative`::
127 The path to the Git repository directory relative to the current working directory.
128
129`references.storageFormat`::
130 The reference storage format. The valid values are:
131+
132include::ref-storage-format.adoc[]
133
134EXAMPLES
135--------
136
137* Retrieves the reference storage format of the current repository:
138+
139------------
140git repo info references.storageFormat
141------------
142+
143
144* Retrieves whether the current repository is bare and whether it is shallow
145using the `nul` format:
146+
147------------
148git repo info --format=nul layout.bare layout.shallow
149------------
150
151SEE ALSO
152--------
153linkgit:git-rev-parse[1]
154
155GIT
156---
157Part of the linkgit:git[1] suite