diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-06-18 11:14:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-19 20:46:26 -0700 |
commit | ba41112a6331e8b454cac6cfd3ee67ae93957a2c (patch) | |
tree | 10fc409a0ff2b2cb88ee4c8809877e663175b3dd /t/t5324-split-commit-graph.sh | |
parent | commit-graph: verify chains with --shallow mode (diff) | |
download | tgif-ba41112a6331e8b454cac6cfd3ee67ae93957a2c.tar.xz |
commit-graph: clean up chains after flattened write
If we write a commit-graph file without the split option, then
we write to $OBJDIR/info/commit-graph and start to ignore
the chains in $OBJDIR/info/commit-graphs/.
Unlink the commit-graph-chain file and expire the graph-{hash}.graph
files in $OBJDIR/info/commit-graphs/ during every write.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5324-split-commit-graph.sh')
-rwxr-xr-x | t/t5324-split-commit-graph.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh index 3df90ae58f..e8df35c30b 100755 --- a/t/t5324-split-commit-graph.sh +++ b/t/t5324-split-commit-graph.sh @@ -216,6 +216,18 @@ test_expect_success 'test merge stragety constants' ' ) ' +test_expect_success 'remove commit-graph-chain file after flattening' ' + git clone . flatten && + ( + cd flatten && + test_line_count = 2 $graphdir/commit-graph-chain && + git commit-graph write --reachable && + test_path_is_missing $graphdir/commit-graph-chain && + ls $graphdir >graph-files && + test_line_count = 0 graph-files + ) +' + corrupt_file() { file=$1 pos=$2 |