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

@ -6,6 +6,10 @@ test_description='git blame'
PROG='git blame -c'
. "$TEST_DIRECTORY"/annotate-tests.sh
test_expect_success 'setup' '
hexsz=$(test_oid hexsz)
'
test_expect_success 'blame untracked file in empty repo' '
>untracked &&
test_must_fail git blame untracked
@ -105,17 +109,17 @@ test_expect_success 'blame --abbrev=<n> works' '
'
test_expect_success 'blame -l aligns regular and boundary commits' '
check_abbrev 40 -l HEAD &&
check_abbrev 39 -l ^HEAD
check_abbrev $hexsz -l HEAD &&
check_abbrev $((hexsz - 1)) -l ^HEAD
'
test_expect_success 'blame --abbrev=40 behaves like -l' '
check_abbrev 40 --abbrev=40 HEAD &&
check_abbrev 39 --abbrev=40 ^HEAD
test_expect_success 'blame --abbrev with full length behaves like -l' '
check_abbrev $hexsz --abbrev=$hexsz HEAD &&
check_abbrev $((hexsz - 1)) --abbrev=$hexsz ^HEAD
'
test_expect_success '--no-abbrev works like --abbrev=40' '
check_abbrev 40 --no-abbrev
test_expect_success '--no-abbrev works like --abbrev with full length' '
check_abbrev $hexsz --no-abbrev
'
test_expect_success '--exclude-promisor-objects does not BUG-crash' '