]> git.ipfire.org Git - thirdparty/git.git/commit
commit-graph: rename "large edges" to "extra edges"
authorSZEDER Gábor <szeder.dev@gmail.com>
Sat, 19 Jan 2019 20:21:13 +0000 (21:21 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Jan 2019 19:33:46 +0000 (11:33 -0800)
commit5af7417bd869d935715a56b2ccdee04d3a79a328
tree920c87fb83f20864043acb3a3ee7a7f37f676d9b
parentd7574c95bb74cd189950cc6e9cad762099382162
commit-graph: rename "large edges" to "extra edges"

The optional 'Large Edge List' chunk of the commit graph file stores
parent information for commits with more than two parents, and the
names of most of the macros, variables, struct fields, and functions
related to this chunk contain the term "large edges", e.g.
write_graph_chunk_large_edges().  However, it's not a really great
term, as the edges to the second and subsequent parents stored in this
chunk are not any larger than the edges to the first and second
parents stored in the "main" 'Commit Data' chunk.  It's the number of
edges, IOW number of parents, that is larger compared to non-merge and
"regular" two-parent merge commits.  And indeed, two functions in
'commit-graph.c' have a local variable called 'num_extra_edges' that
refer to the same thing, and this "extra edges" term is much better at
describing these edges.

So let's rename all these references to "large edges" in macro,
variable, function, etc. names to "extra edges".  There is a
GRAPH_OCTOPUS_EDGES_NEEDED macro as well; for the sake of consistency
rename it to GRAPH_EXTRA_EDGES_NEEDED.

We can do so safely without causing any incompatibility issues,
because the term "large edges" doesn't come up in the file format
itself in any form (the chunk's magic is {'E', 'D', 'G', 'E'}, there
is no 'L' in there), but only in the specification text.  The string
"large edges", however, does come up in the output of 'git
commit-graph read' and in tests looking at its input, but that command
is explicitly documented as debugging aid, so we can change its output
and the affected tests safely.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/commit-graph-format.txt
builtin/commit-graph.c
commit-graph.c
commit-graph.h
t/t5318-commit-graph.sh