Skip to content

Commit 35e54ea

Browse files
committed
Merge branch 'ma/commit-graph-docs' into maint
Doc update. * ma/commit-graph-docs: Doc: refer to the "commit-graph file" with dash git-commit-graph.txt: refer to "*commit*-graph file" git-commit-graph.txt: typeset more in monospace git-commit-graph.txt: fix bullet lists
2 parents 871955c + 4c39944 commit 35e54ea

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

Documentation/git-commit-graph.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git-commit-graph(1)
33

44
NAME
55
----
6-
git-commit-graph - Write and verify Git commit graph files
6+
git-commit-graph - Write and verify Git commit-graph files
77

88

99
SYNOPSIS
@@ -17,24 +17,24 @@ SYNOPSIS
1717
DESCRIPTION
1818
-----------
1919

20-
Manage the serialized commit graph file.
20+
Manage the serialized commit-graph file.
2121

2222

2323
OPTIONS
2424
-------
2525
--object-dir::
26-
Use given directory for the location of packfiles and commit graph
26+
Use given directory for the location of packfiles and commit-graph
2727
file. This parameter exists to specify the location of an alternate
28-
that only has the objects directory, not a full .git directory. The
29-
commit graph file is expected to be at <dir>/info/commit-graph and
30-
the packfiles are expected to be in <dir>/pack.
28+
that only has the objects directory, not a full `.git` directory. The
29+
commit-graph file is expected to be at `<dir>/info/commit-graph` and
30+
the packfiles are expected to be in `<dir>/pack`.
3131

3232

3333
COMMANDS
3434
--------
3535
'write'::
3636

37-
Write a commit graph file based on the commits found in packfiles.
37+
Write a commit-graph file based on the commits found in packfiles.
3838
+
3939
With the `--stdin-packs` option, generate the new commit graph by
4040
walking objects only in the specified pack-indexes. (Cannot be combined
@@ -54,8 +54,8 @@ existing commit-graph file.
5454

5555
'read'::
5656

57-
Read a graph file given by the commit-graph file and output basic
58-
details about the graph file. Used for debugging purposes.
57+
Read the commit-graph file and output basic details about it.
58+
Used for debugging purposes.
5959

6060
'verify'::
6161

@@ -66,27 +66,28 @@ database. Used to check for corrupted data.
6666
EXAMPLES
6767
--------
6868

69-
* Write a commit graph file for the packed commits in your local .git folder.
69+
* Write a commit-graph file for the packed commits in your local `.git`
70+
directory.
7071
+
7172
------------------------------------------------
7273
$ git commit-graph write
7374
------------------------------------------------
7475

75-
* Write a graph file, extending the current graph file using commits
76-
* in <pack-index>.
76+
* Write a commit-graph file, extending the current commit-graph file
77+
using commits in `<pack-index>`.
7778
+
7879
------------------------------------------------
7980
$ echo <pack-index> | git commit-graph write --stdin-packs
8081
------------------------------------------------
8182

82-
* Write a graph file containing all reachable commits.
83+
* Write a commit-graph file containing all reachable commits.
8384
+
8485
------------------------------------------------
8586
$ git show-ref -s | git commit-graph write --stdin-commits
8687
------------------------------------------------
8788

88-
* Write a graph file containing all commits in the current
89-
* commit-graph file along with those reachable from HEAD.
89+
* Write a commit-graph file containing all commits in the current
90+
commit-graph file along with those reachable from `HEAD`.
9091
+
9192
------------------------------------------------
9293
$ git rev-parse HEAD | git commit-graph write --stdin-commits --append

Documentation/technical/commit-graph.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ There are two main costs here:
1515
1. Decompressing and parsing commits.
1616
2. Walking the entire graph to satisfy topological order constraints.
1717

18-
The commit graph file is a supplemental data structure that accelerates
18+
The commit-graph file is a supplemental data structure that accelerates
1919
commit graph walks. If a user downgrades or disables the 'core.commitGraph'
2020
config setting, then the existing ODB is sufficient. The file is stored
2121
as "commit-graph" either in the .git/objects/info directory or in the info
2222
directory of an alternate.
2323

24-
The commit graph file stores the commit graph structure along with some
24+
The commit-graph file stores the commit graph structure along with some
2525
extra metadata to speed up graph walks. By listing commit OIDs in lexi-
2626
cographic order, we can identify an integer position for each commit and
2727
refer to the parents of a commit using those integer positions. We use
@@ -103,7 +103,7 @@ that of a parent.
103103
Design Details
104104
--------------
105105

106-
- The commit graph file is stored in a file named 'commit-graph' in the
106+
- The commit-graph file is stored in a file named 'commit-graph' in the
107107
.git/objects/info directory. This could be stored in the info directory
108108
of an alternate.
109109

@@ -139,7 +139,7 @@ Future Work
139139
- 'log --topo-order'
140140
- 'tag --merged'
141141

142-
- A server could provide a commit graph file as part of the network protocol
142+
- A server could provide a commit-graph file as part of the network protocol
143143
to avoid extra calculations by clients. This feature is only of benefit if
144144
the user is willing to trust the file, because verifying the file is correct
145145
is as hard as computing it from scratch.

0 commit comments

Comments
 (0)