]> git.ipfire.org Git - thirdparty/git.git/commit
commit-graph: load commit-graph chains
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 18 Jun 2019 18:14:25 +0000 (11:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2019 03:46:26 +0000 (20:46 -0700)
commit5c84b3396c73382eb49285b4e4bbb1bf82be3a9c
treec7a49e92ec1657183c5b51ddc4bde481d3a378f9
parent3cbc6ed3ee02ab7c8254d51528ca75644c52d52d
commit-graph: load commit-graph chains

Prepare the logic for reading a chain of commit-graphs.

First, look for a file at $OBJDIR/info/commit-graph. If it exists,
then use that file and stop.

Next, look for the chain file at $OBJDIR/info/commit-graphs/commit-graph-chain.
If this file exists, then load the hash values as line-separated values in that
file and load $OBJDIR/info/commit-graphs/graph-{hash[i]}.graph for each hash[i]
in that file. The file is given in order, so the first hash corresponds to the
"base" file and the final hash corresponds to the "tip" file.

This implementation assumes that all of the graph-{hash}.graph files are in
the same object directory as the commit-graph-chain file. This will be updated
in a future change. This change is purposefully simple so we can isolate the
different concerns.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c