Skip to content

Commit a9db6c6

Browse files
committed
Merge branch 'jt/repo-structure'
"git repo structure", a new command. * jt/repo-structure: builtin/repo: add progress meter for structure stats builtin/repo: add keyvalue and nul format for structure stats builtin/repo: add object counts in structure output builtin/repo: introduce structure subcommand ref-filter: export ref_kind_from_refname() ref-filter: allow NULL filter pattern builtin/repo: rename repo_info() to cmd_repo_info()
2 parents 1750483 + 16a93c0 commit a9db6c6

File tree

6 files changed

+542
-6
lines changed

6 files changed

+542
-6
lines changed

Documentation/git-repo.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SYNOPSIS
99
--------
1010
[synopsis]
1111
git repo info [--format=(keyvalue|nul)] [-z] [<key>...]
12+
git repo structure [--format=(table|keyvalue|nul)]
1213

1314
DESCRIPTION
1415
-----------
@@ -43,6 +44,35 @@ supported:
4344
+
4445
`-z` is an alias for `--format=nul`.
4546

47+
`structure [--format=(table|keyvalue|nul)]`::
48+
Retrieve statistics about the current repository structure. The
49+
following kinds of information are reported:
50+
+
51+
* Reference counts categorized by type
52+
* Reachable object counts categorized by type
53+
54+
+
55+
The output format can be chosen through the flag `--format`. Three formats are
56+
supported:
57+
+
58+
`table`:::
59+
Outputs repository stats in a human-friendly table. This format may
60+
change and is not intended for machine parsing. This is the default
61+
format.
62+
63+
`keyvalue`:::
64+
Each line of output contains a key-value pair for a repository stat.
65+
The '=' character is used to delimit between the key and the value.
66+
Values containing "unusual" characters are quoted as explained for the
67+
configuration variable `core.quotePath` (see linkgit:git-config[1]).
68+
69+
`nul`:::
70+
Similar to `keyvalue`, but uses a NUL character to delimit between
71+
key-value pairs instead of a newline. Also uses a newline character as
72+
the delimiter between the key and value instead of '='. Unlike the
73+
`keyvalue` format, values containing "unusual" characters are never
74+
quoted.
75+
4676
INFO KEYS
4777
---------
4878
In order to obtain a set of values from `git repo info`, you should provide

0 commit comments

Comments
 (0)