diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-06-18 11:14:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-19 20:46:26 -0700 |
commit | 6c622f9f0bbb38a23341dc4294f56d0d909b3d50 (patch) | |
tree | d9e05c4508dfab644d1d897d548ad408bb352fc1 /t/t5515/fetch.br-config-glob-merge_config-glob | |
parent | commit-graph: rearrange chunk count logic (diff) | |
download | tgif-6c622f9f0bbb38a23341dc4294f56d0d909b3d50.tar.xz |
commit-graph: write commit-graph chains
Extend write_commit_graph() to write a commit-graph chain when given the
COMMIT_GRAPH_SPLIT flag.
This implementation is purposefully simplistic in how it creates a new
chain. The commits not already in the chain are added to a new tip
commit-graph file.
Much of the logic around writing a graph-{hash}.graph file and updating
the commit-graph-chain file is the same as the commit-graph file case.
However, there are several places where we need to do some extra logic
in the split case.
Track the list of graph filenames before and after the planned write.
This will be more important when we start merging graph files, but it
also allows us to upgrade our commit-graph file to the appropriate
graph-{hash}.graph file when we upgrade to a chain of commit-graphs.
Note that we use the eighth byte of the commit-graph header to store the
number of base graph files. This determines the length of the base
graphs chunk.
A subtle change of behavior with the new logic is that we do not write a
commit-graph if we our commit list is empty. This extends to the typical
case, which is reflected in t5318-commit-graph.sh.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/fetch.br-config-glob-merge_config-glob')
0 files changed, 0 insertions, 0 deletions