2 .\" Title: git-commit-graph
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.41.0.rc0.4.g004e0f790f
10 .TH "GIT\-COMMIT\-GRAPH" "1" "2023\-05\-17" "Git 2\&.41\&.0\&.rc0\&.4\&.g00" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-commit-graph \- Write and verify Git commit\-graph files
35 \fIgit commit\-graph verify\fR [\-\-object\-dir <dir>] [\-\-shallow] [\-\-[no\-]progress]
36 \fIgit commit\-graph write\fR [\-\-object\-dir <dir>] [\-\-append]
37 [\-\-split[=<strategy>]] [\-\-reachable | \-\-stdin\-packs | \-\-stdin\-commits]
38 [\-\-changed\-paths] [\-\-[no\-]max\-new\-filters <n>] [\-\-[no\-]progress]
44 Manage the serialized commit\-graph file\&.
49 Use given directory for the location of packfiles and commit\-graph file\&. This parameter exists to specify the location of an alternate that only has the objects directory, not a full
51 directory\&. The commit\-graph file is expected to be in the
53 directory and the packfiles are expected to be in
54 \fB<dir>/pack\fR\&. If the directory could not be made into an absolute path, or does not match any known object directory,
55 \fBgit commit\-graph \&.\&.\&.\fR
56 will exit with non\-zero status\&.
61 Turn progress on/off explicitly\&. If neither is specified, progress is shown if standard error is connected to a terminal\&.
67 Write a commit\-graph file based on the commits found in packfiles\&. If the config option
68 \fBcore\&.commitGraph\fR
69 is disabled, then this command will output a warning, then return success without writing a commit\-graph file\&.
72 \fB\-\-stdin\-packs\fR
73 option, generate the new commit graph by walking objects only in the specified pack\-indexes\&. (Cannot be combined with
74 \fB\-\-stdin\-commits\fR
76 \fB\-\-reachable\fR\&.)
79 \fB\-\-stdin\-commits\fR
80 option, generate the new commit graph by walking commits starting at the commits specified in stdin as a list of OIDs in hex, one OID per line\&. OIDs that resolve to non\-commits (either directly, or by peeling tags) are silently ignored\&. OIDs that are malformed, or do not exist generate an error\&. (Cannot be combined with
81 \fB\-\-stdin\-packs\fR
83 \fB\-\-reachable\fR\&.)
87 option, generate the new commit graph by walking commits starting at all refs\&. (Cannot be combined with
88 \fB\-\-stdin\-commits\fR
90 \fB\-\-stdin\-packs\fR\&.)
94 option, include all commits that are present in the existing commit\-graph file\&.
97 \fB\-\-changed\-paths\fR
98 option, compute and write information about the paths changed between a commit and its first parent\&. This operation can take a while on large repositories\&. It provides significant performance gains for getting history of a directory or a file with
99 \fBgit log \-\- <path>\fR\&. If this option is given, future commit\-graph writes will automatically assume that this option was intended\&. Use
100 \fB\-\-no\-changed\-paths\fR
101 to stop storing this data\&.
104 \fB\-\-max\-new\-filters=<n>\fR
105 option, generate at most
107 new Bloom filters (if
108 \fB\-\-changed\-paths\fR
112 \fB\-1\fR, no limit is enforced\&. Only commits present in the new layer count against this limit\&. To retroactively compute Bloom filters over earlier layers, it is advised to use
113 \fB\-\-split=replace\fR\&. Overrides the
114 \fBcommitGraph\&.maxNewFilters\fR
118 \fB\-\-split[=<strategy>]\fR
119 option, write the commit\-graph as a chain of multiple commit\-graph files stored in
120 \fB<dir>/info/commit\-graphs\fR\&. Commit\-graph layers are merged based on the strategy and other splitting options\&. The new commits not already in the commit\-graph are added in a new "tip" file\&. This file is merged with the existing file if the following merge conditions are met:
131 \fB\-\-split=no\-merge\fR
132 is specified, a merge is never performed, and the remaining options are ignored\&.
133 \fB\-\-split=replace\fR
134 overwrites the existing chain with a new one\&. A bare
136 defers to the remaining options\&. (Note that merging a chain of commit graphs replaces the existing chain with a length\-1 chain where the first and only incremental holds the entire graph)\&.
148 \fB\-\-size\-multiple=<X>\fR
149 is not specified, let
151 equal 2\&. If the new tip file would have
153 commits and the previous tip has
160 \fBM\fR, instead merge the two files into a single file\&.
172 \fB\-\-max\-commits=<M>\fR
175 a positive integer, and the new tip file would have more than
177 commits, then instead merge the new tip with the previous tip\&.
180 \fB\-\-expire\-time=<datetime>\fR
181 is not specified, let
183 be the current time\&. After writing the split commit\-graph, delete all unused commit\-graph whose modified times are older than
190 Read the commit\-graph file and verify its contents against the object database\&. Used to check for corrupted data\&.
194 option, only check the tip commit\-graph file in a chain of split commit\-graphs\&.
206 Write a commit\-graph file for the packed commits in your local
214 $ git commit\-graph write
230 Write a commit\-graph file, extending the current commit\-graph file using commits in
231 \fB<pack\-index>\fR\&.
237 $ echo <pack\-index> | git commit\-graph write \-\-stdin\-packs
253 Write a commit\-graph file containing all reachable commits\&.
259 $ git show\-ref \-s | git commit\-graph write \-\-stdin\-commits
275 Write a commit\-graph file containing all commits in the current commit\-graph file along with those reachable from
282 $ git rev\-parse HEAD | git commit\-graph write \-\-stdin\-commits \-\-append
291 Everything below this line in this section is selectively included from the \fBgit-config\fR(1) documentation\&. The content is the same as what\(cqs found there:
293 commitGraph\&.generationVersion
295 Specifies the type of generation number version to use when writing or reading the commit\-graph file\&. If version 1 is specified, then the corrected commit dates will not be written or read\&. Defaults to 2\&.
298 commitGraph\&.maxNewFilters
300 Specifies the default value for the
301 \fB\-\-max\-new\-filters\fR
303 \fBgit commit\-graph write\fR
305 \fBgit-commit-graph\fR(1))\&.
308 commitGraph\&.readChangedPaths
310 If true, then git will use the changed\-path Bloom filters in the commit\-graph file (if it exists, and they are present)\&. Defaults to true\&. See
311 \fBgit-commit-graph\fR(1)
312 for more information\&.
316 see \fBgitformat-commit-graph\fR(5)\&.
319 Part of the \fBgit\fR(1) suite