diff options
| author | Derrick Stolee <dstolee@microsoft.com> | 2018-06-27 09:24:40 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-06-27 10:29:10 -0700 |
| commit | 88968ebf86d9b4524b17f6684dd8c67f0c6df652 (patch) | |
| tree | fc84a4c4e7f94e5358bc481031b81d847f50a3f6 /t/t5318-commit-graph.sh | |
| parent | 1373e547f7d38b9444fcaae16c1de698b719aa15 (diff) | |
| download | git-88968ebf86d9b4524b17f6684dd8c67f0c6df652.tar.xz | |
commit-graph: verify commit date
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5318-commit-graph.sh')
| -rwxr-xr-x | t/t5318-commit-graph.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 3128e19aef..2c65e6a95c 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -273,6 +273,7 @@ GRAPH_BYTE_COMMIT_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN)) GRAPH_BYTE_COMMIT_EXTRA_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 4)) GRAPH_BYTE_COMMIT_WRONG_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 3)) GRAPH_BYTE_COMMIT_GENERATION=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 11)) +GRAPH_BYTE_COMMIT_DATE=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN + 12)) # usage: corrupt_graph_and_verify <position> <data> <string> # Manipulates the commit-graph file at the position @@ -377,4 +378,9 @@ test_expect_success 'detect incorrect generation number' ' "non-zero generation number" ' +test_expect_success 'detect incorrect commit date' ' + corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_DATE "\01" \ + "commit date" +' + test_done |
