Skip to content

Commit 6cf253c

Browse files
committed
commit-graph.txt: improve formatting for asciidoc
When viewing commit-graph.txt as a plain-text document, it makes sense to keep paragraphs left-padded between bullet points. However, asciidoc converts these left-padded paragraphs as monospace fonts, creating an unpleasant document. Remove the padding. The "Future Work" section includes a bulleted list of items, and one item has sub-items. These do not render properly in asciidoc, so remove the sub-list and incorporate them into the paragraph. Signed-off-by: Derrick Stolee <[email protected]>
1 parent 4c66af6 commit 6cf253c

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

Documentation/technical/commit-graph.txt

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ Equivalently, the generation number of a commit A is one more than the
4949
length of a longest path from A to a root commit. The recursive definition
5050
is easier to use for computation and observing the following property:
5151

52-
If A and B are commits with generation numbers N and M, respectively,
53-
and N <= M, then A cannot reach B. That is, we know without searching
54-
that B is not an ancestor of A because it is further from a root commit
55-
than A.
52+
If A and B are commits with generation numbers N and M, respectively,
53+
and N <= M, then A cannot reach B. That is, we know without searching
54+
that B is not an ancestor of A because it is further from a root commit
55+
than A.
5656

57-
Conversely, when checking if A is an ancestor of B, then we only need
58-
to walk commits until all commits on the walk boundary have generation
59-
number at most N. If we walk commits using a priority queue seeded by
60-
generation numbers, then we always expand the boundary commit with highest
61-
generation number and can easily detect the stopping condition.
57+
Conversely, when checking if A is an ancestor of B, then we only need
58+
to walk commits until all commits on the walk boundary have generation
59+
number at most N. If we walk commits using a priority queue seeded by
60+
generation numbers, then we always expand the boundary commit with highest
61+
generation number and can easily detect the stopping condition.
6262

6363
This property can be used to significantly reduce the time it takes to
6464
walk commits and determine topological relationships. Without generation
6565
numbers, the general heuristic is the following:
6666

67-
If A and B are commits with commit time X and Y, respectively, and
68-
X < Y, then A _probably_ cannot reach B.
67+
If A and B are commits with commit time X and Y, respectively, and
68+
X < Y, then A _probably_ cannot reach B.
6969

7070
This heuristic is currently used whenever the computation is allowed to
7171
violate topological relationships due to clock skew (such as "git log"
@@ -121,11 +121,8 @@ Future Work
121121
- After computing and storing generation numbers, we must make graph
122122
walks aware of generation numbers to gain the performance benefits they
123123
enable. This will mostly be accomplished by swapping a commit-date-ordered
124-
priority queue with one ordered by generation number. The following
125-
operations are important candidates:
126-
127-
- 'log --topo-order'
128-
- 'tag --merged'
124+
priority queue with one ordered by generation number. Commands that could
125+
improve include 'git log --topo-order' and 'git tag --merged'.
129126

130127
- A server could provide a commit graph file as part of the network protocol
131128
to avoid extra calculations by clients. This feature is only of benefit if
@@ -148,13 +145,13 @@ Related Links
148145
More discussion about generation numbers and not storing them inside
149146
commit objects. A valuable quote:
150147

151-
"I think we should be moving more in the direction of keeping
152-
repo-local caches for optimizations. Reachability bitmaps have been
153-
a big performance win. I think we should be doing the same with our
154-
properties of commits. Not just generation numbers, but making it
155-
cheap to access the graph structure without zlib-inflating whole
156-
commit objects (i.e., packv4 or something like the "metapacks" I
157-
proposed a few years ago)."
148+
"I think we should be moving more in the direction of keeping
149+
repo-local caches for optimizations. Reachability bitmaps have been
150+
a big performance win. I think we should be doing the same with our
151+
properties of commits. Not just generation numbers, but making it
152+
cheap to access the graph structure without zlib-inflating whole
153+
commit objects (i.e., packv4 or something like the "metapacks" I
154+
proposed a few years ago)."
158155

159156
[4] https://public-inbox.org/git/[email protected]/T/#u
160157
A patch to remove the ahead-behind calculation from 'status'.

0 commit comments

Comments
 (0)