Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-15 06:14:37 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-15 06:14:37 +0300
commite539a834555583a482c780b11927b885f8777e90 (patch)
tree97269ea05540ea06d1709c4138e14b3284b2c85c /read-cache.c
parent36d75581a4966f5d56403d1a01d60e4dc45a8ab0 (diff)
parent00ec50e56d136de41f43c33f39cdbee83f3e4458 (diff)
Merge branch 'bp/read-index-from-skip-verification'
Drop (perhaps overly cautious) sanity check before using the index read from the filesystem at runtime. * bp/read-index-from-skip-verification: read_index_from(): speed index loading by skipping verification of the entry order
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index f3d125c114..b13a1cb8f2 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1511,6 +1511,9 @@ struct ondisk_cache_entry_extended {
/* Allow fsck to force verification of the index checksum. */
int verify_index_checksum;
+/* Allow fsck to force verification of the cache entry order. */
+int verify_ce_order;
+
static int verify_hdr(struct cache_header *hdr, unsigned long size)
{
git_SHA_CTX c;
@@ -1668,6 +1671,9 @@ static void check_ce_order(struct index_state *istate)
{
unsigned int i;
+ if (!verify_ce_order)
+ return;
+
for (i = 1; i < istate->cache_nr; i++) {
struct cache_entry *ce = istate->cache[i - 1];
struct cache_entry *next_ce = istate->cache[i];