Skip to content

Commit

Permalink
Merge pull request #31 from benpeart/skip-sha1-gvfs
Browse files Browse the repository at this point in the history
Revert "gvfs: add a perf test for reading the index"
  • Loading branch information
benpeart authored Oct 10, 2018
2 parents ba58049 + e4e9b68 commit d82c8c1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions t/perf/p0002-read-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d82c8c1

Please sign in to comment.