Merge branch 'ds/omit-trailing-hash-in-index'

Introduce an optional configuration to allow the trailing hash that
protects the index file from bit flipping.

* ds/omit-trailing-hash-in-index:
  features: feature.manyFiles implies fast index writes
  test-lib-functions: add helper for trailing hash
  read-cache: add index.skipHash config option
  hashfile: allow skipping the hash function
This commit is contained in:
Junio C Hamano
2023-01-16 12:07:47 -08:00
10 changed files with 89 additions and 4 deletions

View File

@ -1816,3 +1816,11 @@ test_cmp_config_output () {
sort config-actual >sorted-actual &&
test_cmp sorted-expect sorted-actual
}
# Given a filename, extract its trailing hash as a hex string
test_trailing_hash () {
local file="$1" &&
tail -c $(test_oid rawsz) "$file" |
test-tool hexdump |
sed "s/ //g"
}