diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-02 15:30:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-02 15:30:42 -0700 |
commit | 3a2a1dc17077a27ad1a89db27cb1b4b374f3b0ff (patch) | |
tree | 7cd70df6ba2e915e629a1138373a5c878cd0db45 /revision.c | |
parent | Merge branch 'is/parsing-line-range' (diff) | |
parent | commit.c: allow lookup_commit_reference to handle arbitrary repositories (diff) | |
download | tgif-3a2a1dc17077a27ad1a89db27cb1b4b374f3b0ff.tar.xz |
Merge branch 'sb/object-store-lookup'
lookup_commit_reference() and friends have been updated to find
in-core object for a specific in-core repository instance.
* sb/object-store-lookup: (32 commits)
commit.c: allow lookup_commit_reference to handle arbitrary repositories
commit.c: allow lookup_commit_reference_gently to handle arbitrary repositories
tag.c: allow deref_tag to handle arbitrary repositories
object.c: allow parse_object to handle arbitrary repositories
object.c: allow parse_object_buffer to handle arbitrary repositories
commit.c: allow get_cached_commit_buffer to handle arbitrary repositories
commit.c: allow set_commit_buffer to handle arbitrary repositories
commit.c: migrate the commit buffer to the parsed object store
commit-slabs: remove realloc counter outside of slab struct
commit.c: allow parse_commit_buffer to handle arbitrary repositories
tag: allow parse_tag_buffer to handle arbitrary repositories
tag: allow lookup_tag to handle arbitrary repositories
commit: allow lookup_commit to handle arbitrary repositories
tree: allow lookup_tree to handle arbitrary repositories
blob: allow lookup_blob to handle arbitrary repositories
object: allow lookup_object to handle arbitrary repositories
object: allow object_as_type to handle arbitrary repositories
tag: add repository argument to deref_tag
tag: add repository argument to parse_tag_buffer
tag: add repository argument to lookup_tag
...
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/revision.c b/revision.c index a2570397b6..8bd2e27037 100644 --- a/revision.c +++ b/revision.c @@ -63,10 +63,10 @@ static void mark_tree_contents_uninteresting(struct tree *tree) while (tree_entry(&desc, &entry)) { switch (object_type(entry.mode)) { case OBJ_TREE: - mark_tree_uninteresting(lookup_tree(entry.oid)); + mark_tree_uninteresting(lookup_tree(the_repository, entry.oid)); break; case OBJ_BLOB: - mark_blob_uninteresting(lookup_blob(entry.oid)); + mark_blob_uninteresting(lookup_blob(the_repository, entry.oid)); break; default: /* Subproject commit - not in this repository */ @@ -198,7 +198,7 @@ void add_head_to_pending(struct rev_info *revs) struct object *obj; if (get_oid("HEAD", &oid)) return; - obj = parse_object(&oid); + obj = parse_object(the_repository, &oid); if (!obj) return; add_pending_object(revs, obj, "HEAD"); @@ -210,7 +210,7 @@ static struct object *get_reference(struct rev_info *revs, const char *name, { struct object *object; - object = parse_object(oid); + object = parse_object(the_repository, oid); if (!object) { if (revs->ignore_missing) return object; @@ -247,7 +247,7 @@ static struct commit *handle_commit(struct rev_info *revs, add_pending_object(revs, object, tag->tag); if (!tag->tagged) die("bad tag"); - object = parse_object(&tag->tagged->oid); + object = parse_object(the_repository, &tag->tagged->oid); if (!object) { if (revs->ignore_missing_links || (flags & UNINTERESTING)) return NULL; @@ -1250,7 +1250,7 @@ static void handle_one_reflog_commit(struct object_id *oid, void *cb_data) { struct all_refs_cb *cb = cb_data; if (!is_null_oid(oid)) { - struct object *o = parse_object(oid); + struct object *o = parse_object(the_repository, oid); if (o) { o->flags |= cb->all_flags; /* ??? CMDLINEFLAGS ??? */ @@ -1323,7 +1323,7 @@ static void add_cache_tree(struct cache_tree *it, struct rev_info *revs, int i; if (it->entry_count >= 0) { - struct tree *tree = lookup_tree(&it->oid); + struct tree *tree = lookup_tree(the_repository, &it->oid); add_pending_object_with_path(revs, &tree->object, "", 040000, path->buf); } @@ -1349,7 +1349,7 @@ static void do_add_index_objects_to_pending(struct rev_info *revs, if (S_ISGITLINK(ce->ce_mode)) continue; - blob = lookup_blob(&ce->oid); + blob = lookup_blob(the_repository, &ce->oid); if (!blob) die("unable to add index blob to traversal"); add_pending_object_with_path(revs, &blob->object, "", @@ -1578,8 +1578,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot, *dotdot = '\0'; } - a_obj = parse_object(&a_oid); - b_obj = parse_object(&b_oid); + a_obj = parse_object(the_repository, &a_oid); + b_obj = parse_object(the_repository, &b_oid); if (!a_obj || !b_obj) return dotdot_missing(arg, dotdot, revs, symmetric); @@ -1592,8 +1592,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot, struct commit *a, *b; struct commit_list *exclude; - a = lookup_commit_reference(&a_obj->oid); - b = lookup_commit_reference(&b_obj->oid); + a = lookup_commit_reference(the_repository, &a_obj->oid); + b = lookup_commit_reference(the_repository, &b_obj->oid); if (!a || !b) return dotdot_missing(arg, dotdot, revs, symmetric); @@ -2884,7 +2884,7 @@ static int mark_uninteresting(const struct object_id *oid, uint32_t pos, void *unused) { - struct object *o = parse_object(oid); + struct object *o = parse_object(the_repository, oid); o->flags |= UNINTERESTING | SEEN; return 0; } |