]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5318: update for SHA-256
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 21 Dec 2019 19:49:24 +0000 (19:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 22:06:19 +0000 (14:06 -0800)
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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5318-commit-graph.sh

index 5a3e4e331ad2f28025f3b56373c917f3ef438117..d6b5cf2fc3a162587d6eee9a548fa5627035bd32 100755 (executable)
@@ -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"
 '