]> git.ipfire.org Git - thirdparty/git.git/commit
commit-graph: test --split across alternate without --split
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 18 Jun 2019 18:14:35 +0000 (11:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2019 03:46:26 +0000 (20:46 -0700)
commita09c1301ce5986a374ab008b2125fa26a9bdd2fe
treeb307895679a58897292aa9ad2eaef32bf530ea9b
parente2017c48fe95d44f95bc4e9f36e2210dff698c40
commit-graph: test --split across alternate without --split

We allow sharing commit-graph files across alternates. When we are
writing a split commit-graph, we allow adding tip graph files that
are not in the alternate, but include commits from our local repo.

However, if our alternate is not using the split commit-graph format,
its file is at .git/objects/info/commit-graph and we are trying to
write files in .git/objects/info/commit-graphs/graph-{hash}.graph.

We already have logic to ensure we do not merge across alternate
boundaries, but we also cannot have a commit-graph chain to our
alternate if uses the old filename structure.

Create a test that verifies we create a new split commit-graph
with only one level and we do not modify the existing commit-graph
in the alternate.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5324-split-commit-graph.sh