diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:40 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:40 -0800 |
| commit | 5bd0b21bf78fa365bc5189452e3cbbbec7330002 (patch) | |
| tree | 626fae7b2e20027a5d7bb8b4bbbe34fc630a5a13 /t | |
| parent | 8b4701ae4fa8e68362509013ceb496333b7ca0df (diff) | |
| parent | bc50d6c91f4002b4197a9f5ea5dfdc3c9f105a1c (diff) | |
| download | git-5bd0b21bf78fa365bc5189452e3cbbbec7330002.tar.gz | |
Merge branch 'ds/commit-graph-genno-fix'
Fix incremental update of commit-graph file around corrected commit
date data.
* ds/commit-graph-genno-fix:
commit-graph: prepare commit graph
commit-graph: be extra careful about mixed generations
commit-graph: compute generations separately
commit-graph: validate layers for generation data
commit-graph: always parse before commit_graph_data_at()
commit-graph: use repo_parse_commit
Diffstat (limited to 't')
| -rwxr-xr-x | t/t5318-commit-graph.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index fa27df579a..5b15f1aa0f 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -446,6 +446,27 @@ test_expect_success 'warn on improper hash version' ' ) ' +test_expect_success 'lower layers have overflow chunk' ' + cd "$TRASH_DIRECTORY/full" && + UNIX_EPOCH_ZERO="@0 +0000" && + FUTURE_DATE="@2147483646 +0000" && + rm -f .git/objects/info/commit-graph && + test_commit --date "$FUTURE_DATE" future-1 && + test_commit --date "$UNIX_EPOCH_ZERO" old-1 && + git commit-graph write --reachable && + test_commit --date "$FUTURE_DATE" future-2 && + test_commit --date "$UNIX_EPOCH_ZERO" old-2 && + git commit-graph write --reachable --split=no-merge && + test_commit extra && + git commit-graph write --reachable --split=no-merge && + git commit-graph write --reachable && + graph_read_expect 16 "generation_data generation_data_overflow extra_edges" && + mv .git/objects/info/commit-graph commit-graph-upgraded && + git commit-graph write --reachable && + graph_read_expect 16 "generation_data generation_data_overflow extra_edges" && + test_cmp .git/objects/info/commit-graph commit-graph-upgraded +' + # the verify tests below expect the commit-graph to contain # exactly the commits reachable from the commits/8 branch. # If the file changes the set of commits in the list, then the |
