Skip to content

Commit 410114d

Browse files
committed
Merge branch 'jh/experimental-survey'
This topic branch brings in a new, experimental built-in command to assess the dimensions of a local repository. It is experimental and subject to change! It might grow new options, change its output, or even be moved into `git diagnose --analyze` or something like that. The hope is that this command, which was inspired by `git sizer` (https://github.com/github/git-sizer), will be helpful not only in diagnosing issues with large repositories, but also in modeling what shapes and sizes of repositories can be handled by Git (and as a corollary: where Git needs to improve to be able to accommodate the natural growth of repositories). Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 311e67d + d9b3cb5 commit 410114d

File tree

4 files changed

+987
-15
lines changed

4 files changed

+987
-15
lines changed

Documentation/config/survey.adoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,44 @@ survey.*::
44
background with these options.
55
+
66
--
7+
survey.namerev::
8+
Boolean to show/hide `git name-rev` information for each
9+
reported commit and the containing commit of each
10+
reported tree and blob.
711
verbose::
812
This boolean value implies the `--[no-]verbose` option.
913
progress::
1014
This boolean value implies the `--[no-]progress` option.
1115
top::
1216
This integer value implies `--top=<N>`, specifying the
1317
number of entries in the detail tables.
18+
showBlobSizes::
19+
A non-negative integer value. Requests details on the
20+
<n> largest file blobs by size in bytes. Provides a
21+
default value for `--blob-sizes=<n>` in
22+
linkgit:git-survey[1].
23+
showCommitParents::
24+
A non-negative integer value. Requests details on the
25+
<n> commits with the most number of parents. Provides a
26+
default value for `--commit-parents=<n>` in
27+
linkgit:git-survey[1].
28+
showCommitSizes::
29+
A non-negative integer value. Requests details on the
30+
<n> largest commits by size in bytes. Generally, these
31+
are the commits with the largest commit messages.
32+
Provides a default value for `--commit-sizes=<n>` in
33+
linkgit:git-survey[1].
34+
showTreeEntries::
35+
A non-negative integer value. Requests details on the
36+
<n> trees (directories) with the most number of entries
37+
(files and subdirectories). Provides a default value
38+
for `--tree-entries=<n>` in linkgit:git-survey[1].
39+
showTreeSizes::
40+
A non-negative integer value. Requests details on the
41+
<n> largest trees (directories) by size in bytes. This
42+
will set will usually be equal to the
43+
`survey.showTreeEntries` set, but may be skewed by very
44+
long file or subdirectory entry names. Provides a
45+
default value for `--tree-sizes=<n>` in
46+
linkgit:git-survey[1].
1447
--

Documentation/git-survey.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ OPTIONS
3232
--progress::
3333
Show progress. This is automatically enabled when interactive.
3434

35+
--[no-]name-rev::
36+
Print `git name-rev` output for each commit, tree, and blob.
37+
Defaults to true.
38+
3539
Ref Selection
3640
~~~~~~~~~~~~~
3741

@@ -59,6 +63,32 @@ only refs for the given options are added.
5963
--other::
6064
Add notes (`refs/notes/`) and stashes (`refs/stash/`) to the set.
6165

66+
Large Item Selection
67+
~~~~~~~~~~~~~~~~~~~~
68+
69+
The following options control the optional display of large items under
70+
various dimensions of scale. The OID of the largest `n` objects will be
71+
displayed in reverse sorted order. For each, `n` defaults to 10.
72+
73+
--commit-parents::
74+
Shows the OIDs of the commits with the most parent commits.
75+
76+
--commit-sizes::
77+
Shows the OIDs of the largest commits by size in bytes. This is
78+
usually the ones with the largest commit messages.
79+
80+
--tree-entries::
81+
Shows the OIDs of the trees with the most number of entries. These
82+
are the directories with the most number of files or subdirectories.
83+
84+
--tree-sizes::
85+
Shows the OIDs of the largest trees by size in bytes. This set
86+
will usually be the same as the vector of number of entries unless
87+
skewed by very long entry names.
88+
89+
--blob-sizes::
90+
Shows the OIDs of the largest blobs by size in bytes.
91+
6292
OUTPUT
6393
------
6494

@@ -78,6 +108,11 @@ Reachable Object Summary
78108
The reachable object summary shows the total number of each kind of Git
79109
object, including tags, commits, trees, and blobs.
80110

111+
CONFIGURATION
112+
-------------
113+
114+
include::config/survey.adoc[]
115+
81116
GIT
82117
---
83118
Part of the linkgit:git[1] suite

0 commit comments

Comments
 (0)