mirror of
https://github.com/git/git.git
synced 2026-01-09 01:34:00 +00:00
object: stop depending on the_repository
There are a couple of functions exposed by "object.c" that implicitly depend on `the_repository`. Remove this dependency by injecting the repository via a parameter. Adapt callers accordingly by simply using `the_repository`, except in cases where the subsystem is already free of the repository. In that case, we instead pass the repository provided by the caller's context. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
228457c9d9
commit
74d414c9f1
@@ -1301,7 +1301,7 @@ static struct bitmap *find_boundary_objects(struct bitmap_index *bitmap_git,
|
||||
revs->tag_objects = tmp_tags;
|
||||
|
||||
reset_revision_walk();
|
||||
clear_object_flags(UNINTERESTING);
|
||||
clear_object_flags(repo, UNINTERESTING);
|
||||
|
||||
/*
|
||||
* Then add the boundary commit(s) as fill-in traversal tips.
|
||||
@@ -1935,7 +1935,7 @@ struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs,
|
||||
struct object *object = revs->pending.objects[i].item;
|
||||
|
||||
if (object->type == OBJ_NONE)
|
||||
parse_object_or_die(&object->oid, NULL);
|
||||
parse_object_or_die(revs->repo, &object->oid, NULL);
|
||||
|
||||
while (object->type == OBJ_TAG) {
|
||||
struct tag *tag = (struct tag *) object;
|
||||
@@ -1945,7 +1945,7 @@ struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs,
|
||||
else
|
||||
object_list_insert(object, &wants);
|
||||
|
||||
object = parse_object_or_die(get_tagged_oid(tag), NULL);
|
||||
object = parse_object_or_die(revs->repo, get_tagged_oid(tag), NULL);
|
||||
object->flags |= (tag->object.flags & UNINTERESTING);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user