From: brian m. carlson Date: Sat, 21 Dec 2019 19:49:24 +0000 (+0000) Subject: t5318: update for SHA-256 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=1d86c8f0ce3471f0e8f2194dd821ffd292d79e3d;p=git.git t5318: update for SHA-256 When running with SHA-256 as the hash algorithm, the hash version octet is 2 instead of 1. Pick the right value depending on the hash algorithm and use it where we look for the existing value. To ensure the test checking for invalid data passes, use 3 as the test value for an invalid hash version. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 5a3e4e331a..d6b5cf2fc3 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -481,7 +481,7 @@ test_expect_success 'detect bad version' ' ' test_expect_success 'detect bad hash version' ' - corrupt_graph_and_verify $GRAPH_BYTE_HASH "\02" \ + corrupt_graph_and_verify $GRAPH_BYTE_HASH "\03" \ "hash version" '