Merge branch 'jh/fsck-promisors'
In preparation for implementing narrow/partial clone, the machinery for checking object connectivity used by gc and fsck has been taught that a missing object is OK when it is referenced by a packfile specially marked as coming from trusted repository that promises to make them available on-demand and lazily. * jh/fsck-promisors: gc: do not repack promisor packfiles rev-list: support termination at promisor objects sha1_file: support lazily fetching missing objects introduce fetch-object: fetch one promisor object index-pack: refactor writing of .keep files fsck: support promisor objects as CLI argument fsck: support referenced promisor objects fsck: support refs pointing to promisor objects fsck: introduce partialclone extension extension.partialclone: introduce partial clone extension
This commit is contained in:
13
cache.h
13
cache.h
@ -914,10 +914,12 @@ extern int grafts_replace_parents;
|
||||
#define GIT_REPO_VERSION 0
|
||||
#define GIT_REPO_VERSION_READ 1
|
||||
extern int repository_format_precious_objects;
|
||||
extern char *repository_format_partial_clone;
|
||||
|
||||
struct repository_format {
|
||||
int version;
|
||||
int precious_objects;
|
||||
char *partial_clone; /* value of extensions.partialclone */
|
||||
int is_bare;
|
||||
int hash_algo;
|
||||
char *work_tree;
|
||||
@ -1648,7 +1650,8 @@ extern struct packed_git {
|
||||
unsigned pack_local:1,
|
||||
pack_keep:1,
|
||||
freshened:1,
|
||||
do_not_close:1;
|
||||
do_not_close:1,
|
||||
pack_promisor:1;
|
||||
unsigned char sha1[20];
|
||||
struct revindex_entry *revindex;
|
||||
/* something like ".git/objects/pack/xxxxx.pack" */
|
||||
@ -1787,6 +1790,14 @@ struct object_info {
|
||||
#define OBJECT_INFO_QUICK 8
|
||||
extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags);
|
||||
|
||||
/*
|
||||
* Set this to 0 to prevent sha1_object_info_extended() from fetching missing
|
||||
* blobs. This has a difference only if extensions.partialClone is set.
|
||||
*
|
||||
* Its default value is 1.
|
||||
*/
|
||||
extern int fetch_if_missing;
|
||||
|
||||
/* Dumb servers support */
|
||||
extern int update_server_info(int);
|
||||
|
||||
|
Reference in New Issue
Block a user