]> git.ipfire.org Git - thirdparty/git.git/commit - commit-graph.h
commit-graph: add base graphs chunk
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 18 Jun 2019 18:14:26 +0000 (11:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2019 03:46:26 +0000 (20:46 -0700)
commit118bd570029f5610abdbf1a220e87d3a5c241f5f
treeefebe66ef31726d2eb9c8b18ccf295510beb47c8
parent5c84b3396c73382eb49285b4e4bbb1bf82be3a9c
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>
Documentation/technical/commit-graph-format.txt
commit-graph.c
commit-graph.h