summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-06-18 18:14:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-20 03:46:26 (GMT)
commit118bd570029f5610abdbf1a220e87d3a5c241f5f (patch)
treeefebe66ef31726d2eb9c8b18ccf295510beb47c8 /Documentation/technical
parent5c84b3396c73382eb49285b4e4bbb1bf82be3a9c (diff)
downloadgit-118bd570029f5610abdbf1a220e87d3a5c241f5f.zip
git-118bd570029f5610abdbf1a220e87d3a5c241f5f.tar.gz
git-118bd570029f5610abdbf1a220e87d3a5c241f5f.tar.bz2
commit-graph: add base graphs chunk
To quickly verify a commit-graph chain is valid on load, we will read from the new "Base Graphs Chunk" of each file in the chain. This will prevent accidentally loading incorrect data from manually editing the commit-graph-chain file or renaming graph-{hash}.graph files. The commit_graph struct already had an object_id struct "oid", but it was never initialized or used. Add a line to read the hash from the end of the commit-graph file and into the oid member. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/commit-graph-format.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/technical/commit-graph-format.txt b/Documentation/technical/commit-graph-format.txt
index 16452a0..a4f1744 100644
--- a/Documentation/technical/commit-graph-format.txt
+++ b/Documentation/technical/commit-graph-format.txt
@@ -44,8 +44,9 @@ HEADER:
1-byte number (C) of "chunks"
- 1-byte (reserved for later use)
- Current clients should ignore this value.
+ 1-byte number (B) of base commit-graphs
+ We infer the length (H*B) of the Base Graphs chunk
+ from this value.
CHUNK LOOKUP:
@@ -92,6 +93,12 @@ CHUNK DATA:
positions for the parents until reaching a value with the most-significant
bit on. The other bits correspond to the position of the last parent.
+ Base Graphs List (ID: {'B', 'A', 'S', 'E'}) [Optional]
+ This list of H-byte hashes describe a set of B commit-graph files that
+ form a commit-graph chain. The graph position for the ith commit in this
+ file's OID Lookup chunk is equal to i plus the number of commits in all
+ base graphs. If B is non-zero, this chunk must exist.
+
TRAILER:
H-byte HASH-checksum of all of the above.