config: create core.multiPackIndex setting
The core.multiPackIndex config setting controls the multi-pack- index (MIDX) feature. If false, the setting will disable all reads from the multi-pack-index file. Read this config setting in the new prepare_multi_pack_index_one() which is called during prepare_packed_git(). This check is run once per repository. Add comparison commands in t5319-multi-pack-index.sh to check typical Git behavior remains the same as the config setting is turned on and off. This currently includes 'git rev-list' and 'git log' commands to trigger several object database reads. Currently, these would only catch an error in the prepare_multi_pack_index_one(), but with later commits will catch errors in object lookups, abbreviations, and approximate object counts. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
662148c435
commit
c4d25228eb
5
midx.h
5
midx.h
@ -1,7 +1,11 @@
|
||||
#ifndef __MIDX_H__
|
||||
#define __MIDX_H__
|
||||
|
||||
#include "repository.h"
|
||||
|
||||
struct multi_pack_index {
|
||||
struct multi_pack_index *next;
|
||||
|
||||
int fd;
|
||||
|
||||
const unsigned char *data;
|
||||
@ -25,6 +29,7 @@ struct multi_pack_index {
|
||||
};
|
||||
|
||||
struct multi_pack_index *load_multi_pack_index(const char *object_dir);
|
||||
int prepare_multi_pack_index_one(struct repository *r, const char *object_dir);
|
||||
|
||||
int write_midx_file(const char *object_dir);
|
||||
|
||||
|
Reference in New Issue
Block a user