Autogenerated manpages for v2.48.1-220-gbc204b
[git-manpages.git] / man1 / git-commit-graph.1
blob55ee9acb3cd555ec0bfb24d34fa52e01b02237ea
1 '\" t
2 .\"     Title: git-commit-graph
3 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\"      Date: 2025-02-03
6 .\"    Manual: Git Manual
7 .\"    Source: Git 2.48.1.220.gbc204b7427
8 .\"  Language: English
9 .\"
10 .TH "GIT\-COMMIT\-GRAPH" "1" "2025-02-03" "Git 2\&.48\&.1\&.220\&.gbc204b" "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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 git-commit-graph \- Write and verify Git commit\-graph files
32 .SH "SYNOPSIS"
33 .sp
34 .nf
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]
39                         <split\-options>
40 .fi
41 .SH "DESCRIPTION"
42 .sp
43 Manage the serialized commit\-graph file\&.
44 .SH "OPTIONS"
45 .PP
46 \-\-object\-dir
47 .RS 4
48 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 \&.\fBgit\fR
49 directory\&. The commit\-graph file is expected to be in the
50 \fI<dir>\fR\fB/info\fR
51 directory and the packfiles are expected to be in
52 \fI<dir>\fR\fB/pack\fR\&. If the directory could not be made into an absolute path, or does not match any known object directory,
53 \fBgit\fR
54 \fBcommit\-graph\fR
55 \&.\&.\&. will exit with non\-zero status\&.
56 .RE
57 .PP
58 \-\-[no\-]progress
59 .RS 4
60 Turn progress on/off explicitly\&. If neither is specified, progress is shown if standard error is connected to a terminal\&.
61 .RE
62 .SH "COMMANDS"
63 .PP
64 \fIwrite\fR
65 .RS 4
66 Write a commit\-graph file based on the commits found in packfiles\&. If the config option
67 \fBcore\&.commitGraph\fR
68 is disabled, then this command will output a warning, then return success without writing a commit\-graph file\&.
69 .sp
70 With the
71 \fB\-\-stdin\-packs\fR
72 option, generate the new commit graph by walking objects only in the specified pack\-indexes\&. (Cannot be combined with
73 \fB\-\-stdin\-commits\fR
75 \fB\-\-reachable\fR\&.)
76 .sp
77 With the
78 \fB\-\-stdin\-commits\fR
79 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
80 \fB\-\-stdin\-packs\fR
82 \fB\-\-reachable\fR\&.)
83 .sp
84 With the
85 \fB\-\-reachable\fR
86 option, generate the new commit graph by walking commits starting at all refs\&. (Cannot be combined with
87 \fB\-\-stdin\-commits\fR
89 \fB\-\-stdin\-packs\fR\&.)
90 .sp
91 With the
92 \fB\-\-append\fR
93 option, include all commits that are present in the existing commit\-graph file\&.
94 .sp
95 With the
96 \fB\-\-changed\-paths\fR
97 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
98 \fBgit\fR
99 \fBlog\fR
100 \fB\-\-\fR
101 \fI<path>\fR\&. If this option is given, future commit\-graph writes will automatically assume that this option was intended\&. Use
102 \fB\-\-no\-changed\-paths\fR
103 to stop storing this data\&.
105 With the
106 \fB\-\-max\-new\-filters=\fR\fI<n>\fR
107 option, generate at most
108 \fBn\fR
109 new Bloom filters (if
110 \fB\-\-changed\-paths\fR
111 is specified)\&. If
112 \fBn\fR
114 \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
115 \fB\-\-split=replace\fR\&. Overrides the
116 \fBcommitGraph\&.maxNewFilters\fR
117 configuration\&.
119 With the
120 \fB\-\-split\fR[\fB=\fR\fI<strategy>\fR] option, write the commit\-graph as a chain of multiple commit\-graph files stored in
121 \fI<dir>\fR\fB/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:
123 .RS 4
124 .ie n \{\
125 \h'-04'\(bu\h'+03'\c
127 .el \{\
128 .sp -1
129 .IP \(bu 2.3
132 \fB\-\-split=no\-merge\fR
133 is specified, a merge is never performed, and the remaining options are ignored\&.
134 \fB\-\-split=replace\fR
135 overwrites the existing chain with a new one\&. A bare
136 \fB\-\-split\fR
137 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)\&.
140 .RS 4
141 .ie n \{\
142 \h'-04'\(bu\h'+03'\c
144 .el \{\
145 .sp -1
146 .IP \(bu 2.3
149 \fB\-\-size\-multiple=\fR\fI<X>\fR
150 is not specified, let
151 \fBX\fR
152 equal 2\&. If the new tip file would have
153 \fBN\fR
154 commits and the previous tip has
155 \fBM\fR
156 commits and
157 \fBX\fR
158 times
159 \fBN\fR
160 is greater than
161 \fBM\fR, instead merge the two files into a single file\&.
164 .RS 4
165 .ie n \{\
166 \h'-04'\(bu\h'+03'\c
168 .el \{\
169 .sp -1
170 .IP \(bu 2.3
173 \fB\-\-max\-commits=\fR\fI<M>\fR
174 is specified with
175 \fBM\fR
176 a positive integer, and the new tip file would have more than
177 \fBM\fR
178 commits, then instead merge the new tip with the previous tip\&.
180 Finally, if
181 \fB\-\-expire\-time=\fR\fI<datetime>\fR
182 is not specified, let
183 \fBdatetime\fR
184 be the current time\&. After writing the split commit\-graph, delete all unused commit\-graph whose modified times are older than
185 \fBdatetime\fR\&.
189 \fIverify\fR
190 .RS 4
191 Read the commit\-graph file and verify its contents against the object database\&. Used to check for corrupted data\&.
193 With the
194 \fB\-\-shallow\fR
195 option, only check the tip commit\-graph file in a chain of split commit\-graphs\&.
197 .SH "EXAMPLES"
199 .RS 4
200 .ie n \{\
201 \h'-04'\(bu\h'+03'\c
203 .el \{\
204 .sp -1
205 .IP \(bu 2.3
207 Write a commit\-graph file for the packed commits in your local \&.\fBgit\fR
208 directory\&.
210 .if n \{\
211 .RS 4
214 $ git commit\-graph write
216 .if n \{\
221 .RS 4
222 .ie n \{\
223 \h'-04'\(bu\h'+03'\c
225 .el \{\
226 .sp -1
227 .IP \(bu 2.3
229 Write a commit\-graph file, extending the current commit\-graph file using commits in
230 \fI<pack\-index>\fR\&.
232 .if n \{\
233 .RS 4
236 $ echo <pack\-index> | git commit\-graph write \-\-stdin\-packs
238 .if n \{\
243 .RS 4
244 .ie n \{\
245 \h'-04'\(bu\h'+03'\c
247 .el \{\
248 .sp -1
249 .IP \(bu 2.3
251 Write a commit\-graph file containing all reachable commits\&.
253 .if n \{\
254 .RS 4
257 $ git show\-ref \-s | git commit\-graph write \-\-stdin\-commits
259 .if n \{\
264 .RS 4
265 .ie n \{\
266 \h'-04'\(bu\h'+03'\c
268 .el \{\
269 .sp -1
270 .IP \(bu 2.3
272 Write a commit\-graph file containing all commits in the current commit\-graph file along with those reachable from
273 \fBHEAD\fR\&.
275 .if n \{\
276 .RS 4
279 $ git rev\-parse HEAD | git commit\-graph write \-\-stdin\-commits \-\-append
281 .if n \{\
285 .SH "CONFIGURATION"
287 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:
289 commitGraph\&.generationVersion
290 .RS 4
291 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\&.
294 commitGraph\&.maxNewFilters
295 .RS 4
296 Specifies the default value for the
297 \fB\-\-max\-new\-filters\fR
298 option of
299 \fBgit\fR
300 \fBcommit\-graph\fR
301 \fBwrite\fR
302 (c\&.f\&.,
303 \fBgit-commit-graph\fR(1))\&.
306 commitGraph\&.readChangedPaths
307 .RS 4
308 Deprecated\&. Equivalent to commitGraph\&.changedPathsVersion=\-1 if true, and commitGraph\&.changedPathsVersion=0 if false\&. (If commitGraph\&.changedPathVersion is also set, commitGraph\&.changedPathsVersion takes precedence\&.)
311 commitGraph\&.changedPathsVersion
312 .RS 4
313 Specifies the version of the changed\-path Bloom filters that Git will read and write\&. May be \-1, 0, 1, or 2\&. Note that values greater than 1 may be incompatible with older versions of Git which do not yet understand those versions\&. Use caution when operating in a mixed\-version environment\&.
315 Defaults to \-1\&.
317 If \-1, Git will use the version of the changed\-path Bloom filters in the repository, defaulting to 1 if there are none\&.
319 If 0, Git will not read any Bloom filters, and will write version 1 Bloom filters when instructed to write\&.
321 If 1, Git will only read version 1 Bloom filters, and will write version 1 Bloom filters\&.
323 If 2, Git will only read version 2 Bloom filters, and will write version 2 Bloom filters\&.
326 \fBgit-commit-graph\fR(1)
327 for more information\&.
329 .SH "FILE FORMAT"
331 see \fBgitformat-commit-graph\fR(5)\&.
332 .SH "GIT"
334 Part of the \fBgit\fR(1) suite