Merge branch 'bc/sha-256-part-3'

The final leg of SHA-256 transition.

* bc/sha-256-part-3: (39 commits)
  t: remove test_oid_init in tests
  docs: add documentation for extensions.objectFormat
  ci: run tests with SHA-256
  t: make SHA1 prerequisite depend on default hash
  t: allow testing different hash algorithms via environment
  t: add test_oid option to select hash algorithm
  repository: enable SHA-256 support by default
  setup: add support for reading extensions.objectformat
  bundle: add new version for use with SHA-256
  builtin/verify-pack: implement an --object-format option
  http-fetch: set up git directory before parsing pack hashes
  t0410: mark test with SHA1 prerequisite
  t5308: make test work with SHA-256
  t9700: make hash size independent
  t9500: ensure that algorithm info is preserved in config
  t9350: make hash size independent
  t9301: make hash size independent
  t9300: use $ZERO_OID instead of hard-coded object ID
  t9300: abstract away SHA-1-specific constants
  t8011: make hash size independent
  ...
This commit is contained in:
Junio C Hamano
2020-08-11 18:04:11 -07:00
74 changed files with 633 additions and 351 deletions

View File

@ -891,10 +891,6 @@ test_expect_success 'test_atexit is run' "
test_path_is_missing also-clean-atexit
"
test_expect_success 'test_oid setup' '
test_oid_init
'
test_expect_success 'test_oid provides sane info by default' '
test_oid zero >actual &&
grep "^00*\$" actual &&
@ -928,6 +924,17 @@ test_expect_success 'test_oid can look up data for SHA-256' '
test "$hexsz" -eq 64
'
test_expect_success 'test_oid can look up data for a specified algorithm' '
rawsz="$(test_oid --hash=sha1 rawsz)" &&
hexsz="$(test_oid --hash=sha1 hexsz)" &&
test "$rawsz" -eq 20 &&
test "$hexsz" -eq 40 &&
rawsz="$(test_oid --hash=sha256 rawsz)" &&
hexsz="$(test_oid --hash=sha256 hexsz)" &&
test "$rawsz" -eq 32 &&
test "$hexsz" -eq 64
'
test_expect_success 'test_bool_env' '
(
sane_unset envvar &&