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 ...
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
#include "gpg-interface.h"
|
||||
#include "progress.h"
|
||||
#include "commit-slab.h"
|
||||
#include "repository.h"
|
||||
|
||||
#define MAIL_DEFAULT_WRAP 72
|
||||
|
||||
@ -619,7 +620,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
|
||||
rev.shown_one = 1;
|
||||
if (ret)
|
||||
break;
|
||||
o = parse_object(&t->tagged->oid);
|
||||
o = parse_object(the_repository, &t->tagged->oid);
|
||||
if (!o)
|
||||
ret = error(_("Could not read object %s"),
|
||||
oid_to_hex(&t->tagged->oid));
|
||||
@ -906,8 +907,8 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
|
||||
o2 = rev->pending.objects[1].item;
|
||||
flags1 = o1->flags;
|
||||
flags2 = o2->flags;
|
||||
c1 = lookup_commit_reference(&o1->oid);
|
||||
c2 = lookup_commit_reference(&o2->oid);
|
||||
c1 = lookup_commit_reference(the_repository, &o1->oid);
|
||||
c2 = lookup_commit_reference(the_repository, &o2->oid);
|
||||
|
||||
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
|
||||
die(_("Not a range."));
|
||||
@ -1864,7 +1865,8 @@ static int add_pending_commit(const char *arg, struct rev_info *revs, int flags)
|
||||
{
|
||||
struct object_id oid;
|
||||
if (get_oid(arg, &oid) == 0) {
|
||||
struct commit *commit = lookup_commit_reference(&oid);
|
||||
struct commit *commit = lookup_commit_reference(the_repository,
|
||||
&oid);
|
||||
if (commit) {
|
||||
commit->object.flags |= flags;
|
||||
add_pending_object(revs, &commit->object, arg);
|
||||
|
||||
Reference in New Issue
Block a user