From 3bba652d3b657b933ab2f9cb479f439a53686679 Mon Sep 17 00:00:00 2001 From: Ben Peart Date: Mon, 8 Oct 2018 11:51:04 -0400 Subject: [PATCH 1/2] Revert "gvfs: add a perf test for reading the index" This reverts commit 2e885645fd329f59005e8f762abf5098faff93f8. This test has been broken since: 5fbe600cb5 t/helper: merge test-read-cache into test-tool and hasn't been needed since: a33fc72fe9 read-cache: force_verify_index_checksum which accomplishes the same goal. Signed-off-by: Ben Peart --- t/perf/p0002-read-cache.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/t/perf/p0002-read-cache.sh b/t/perf/p0002-read-cache.sh index f485e5c147f7a5..cdd105a5945239 100755 --- a/t/perf/p0002-read-cache.sh +++ b/t/perf/p0002-read-cache.sh @@ -11,8 +11,4 @@ test_perf "read_cache/discard_cache $count times" " test-tool read-cache $count " -test_perf "read_cache/discard_cache $count times with core.gvfs flag on" " - git config core.gvfs 1 - test-read-cache $count -" test_done From e4e9b685d4485689298d81b35c54ce5fb4307506 Mon Sep 17 00:00:00 2001 From: Ben Peart Date: Mon, 8 Oct 2018 11:56:12 -0400 Subject: [PATCH 2/2] read-cache: remove the GVFS specific optimization to verify_hdr() Remove the gvfs specific test which allowed us to skip the SHA1-1 verification as it has not been needed since master accepted: a33fc72fe9 read-cache: force_verify_index_checksum which accomplishes the same goal. Signed-off-by: Ben Peart --- Documentation/config.txt | 4 ++-- read-cache.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index e55cb771904ba2..fa8e7e393f2205 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -972,9 +972,9 @@ core.gvfs:: below can be used to turn on specific features. + -- - GVFS_SKIP_SHA_ON_INDEX_READ:: + GVFS_SKIP_SHA_ON_INDEX:: Bit value 1 - Disables the calculation and validation of the sha when reading the index + Disables the calculation of the sha when writing the index GVFS_MISSING_OK:: Bit value 4 Normally git write-tree ensures that the objects referenced by the diff --git a/read-cache.c b/read-cache.c index 85064318bd25b0..39ba2acfc93129 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1669,9 +1669,6 @@ static int verify_hdr(struct cache_header *hdr, unsigned long size) if (!verify_index_checksum) return 0; - if (gvfs_config_is_set(GVFS_SKIP_SHA_ON_INDEX)) - return 0; - the_hash_algo->init_fn(&c); the_hash_algo->update_fn(&c, hdr, size - the_hash_algo->rawsz); the_hash_algo->final_fn(hash, &c);