Merge branch 'kn/the-repository' into kn/midx-wo-the-repository
* kn/the-repository: packfile.c: remove unnecessary prepare_packed_git() call midx: add repository to `multi_pack_index` struct config: make `packed_git_(limit|window_size)` non-global variables config: make `delta_base_cache_limit` a non-global variable packfile: pass down repository to `for_each_packed_object` packfile: pass down repository to `has_object[_kept]_pack` packfile: pass down repository to `odb_pack_name` packfile: pass `repository` to static function in the file packfile: use `repository` from `packed_git` directly packfile: add repository to struct `packed_git`
This commit is contained in:
@ -1530,7 +1530,7 @@ static int want_found_object(const struct object_id *oid, int exclude,
|
||||
return 0;
|
||||
if (ignore_packed_keep_in_core && p->pack_keep_in_core)
|
||||
return 0;
|
||||
if (has_object_kept_pack(oid, flags))
|
||||
if (has_object_kept_pack(p->repo, oid, flags))
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3628,7 +3628,7 @@ static void show_cruft_commit(struct commit *commit, void *data)
|
||||
|
||||
static int cruft_include_check_obj(struct object *obj, void *data UNUSED)
|
||||
{
|
||||
return !has_object_kept_pack(&obj->oid, IN_CORE_KEEP_PACKS);
|
||||
return !has_object_kept_pack(to_pack.repo, &obj->oid, IN_CORE_KEEP_PACKS);
|
||||
}
|
||||
|
||||
static int cruft_include_check(struct commit *commit, void *data)
|
||||
@ -3859,7 +3859,8 @@ static void show_object__ma_allow_promisor(struct object *obj, const char *name,
|
||||
* Quietly ignore EXPECTED missing objects. This avoids problems with
|
||||
* staging them now and getting an odd error later.
|
||||
*/
|
||||
if (!has_object(the_repository, &obj->oid, 0) && is_promisor_object(&obj->oid))
|
||||
if (!has_object(the_repository, &obj->oid, 0) &&
|
||||
is_promisor_object(to_pack.repo, &obj->oid))
|
||||
return;
|
||||
|
||||
show_object(obj, name, data);
|
||||
@ -3928,7 +3929,9 @@ static int add_object_in_unpacked_pack(const struct object_id *oid,
|
||||
|
||||
static void add_objects_in_unpacked_packs(void)
|
||||
{
|
||||
if (for_each_packed_object(add_object_in_unpacked_pack, NULL,
|
||||
if (for_each_packed_object(to_pack.repo,
|
||||
add_object_in_unpacked_pack,
|
||||
NULL,
|
||||
FOR_EACH_OBJECT_PACK_ORDER |
|
||||
FOR_EACH_OBJECT_LOCAL_ONLY |
|
||||
FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS |
|
||||
|
Reference in New Issue
Block a user