|
|
|
@ -273,6 +273,7 @@ GRAPH_BYTE_COMMIT_PARENT=$(($GRAPH_COMMIT_DATA_OFFSET + $HASH_LEN))
@@ -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' '
@@ -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 |
|
|
|
|