git/builtin
Jeff Hostetler a33fc72fe9 read-cache: force_verify_index_checksum
Teach git to skip verification of the SHA1-1 checksum at the end of
the index file in verify_hdr() which is called from read_index()
unless the "force_verify_index_checksum" global variable is set.

Teach fsck to force this verification.

The checksum verification is for detecting disk corruption, and for
small projects, the time it takes to compute SHA-1 is not that
significant, but for gigantic repositories this calculation adds
significant time to every command.

These effect can be seen using t/perf/p0002-read-cache.sh:

Test                                          HEAD~1            HEAD
--------------------------------------------------------------------------------------
0002.1: read_cache/discard_cache 1000 times   0.66(0.44+0.20)   0.30(0.27+0.02) -54.5%

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-15 00:58:36 -07:00
..
2016-11-22 13:55:20 -08:00
2017-03-17 13:50:24 -07:00
2017-03-17 13:50:25 -07:00
2017-03-17 13:50:25 -07:00
2017-01-30 14:17:00 -08:00
2017-04-15 00:58:36 -07:00
2017-03-17 13:50:23 -07:00
2017-03-17 13:50:25 -07:00
2016-09-29 15:42:18 -07:00
2017-01-18 15:12:15 -08:00
2017-03-17 13:50:25 -07:00
2017-01-31 13:14:56 -08:00
2017-03-17 13:50:25 -07:00
2015-10-05 13:20:08 -07:00
2017-03-27 10:59:26 -07:00
2017-03-22 15:41:21 -07:00
2017-03-24 13:07:37 -07:00
2017-01-23 18:51:56 -08:00