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:
@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user