t4044: skip test if not using SHA-1
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 13 May 2018 02:24:19 +0000 (02:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 May 2018 02:02:01 +0000 (11:02 +0900)
This test relies on objects with colliding short names which are
necessarily dependent on the hash used. Skip the test if we're not
using SHA-1.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4044-diff-index-unique-abbrev.sh
index d5ce72be63a5515d270bd407da47fee9048d1d1b..647905e01fb963efce34cd30b351a31a671cbb5e 100755 (executable)
@@ -3,6 +3,12 @@
 test_description='test unique sha1 abbreviation on "index from..to" line'
 . ./test-lib.sh
 
+if ! test_have_prereq SHA1
+then
+       skip_all='not using SHA-1 for objects'
+       test_done
+fi
+
 cat >expect_initial <<EOF
 100644 blob 51d2738463ea4ca66f8691c91e33ce64b7d41bb1   foo
 EOF