Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-03 01:30:42 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-03 01:30:42 +0300
commit3a2a1dc17077a27ad1a89db27cb1b4b374f3b0ff (patch)
tree7cd70df6ba2e915e629a1138373a5c878cd0db45 /ref-filter.c
parent6566a917d8a8d3070b5fdc94fbe5f6d68a4d656b (diff)
parent1f6c72fe55fded90cadcefffe5bd980a6f896579 (diff)
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 'ref-filter.c')
-rw-r--r--ref-filter.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 492f2b770d..600774de68 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -4,6 +4,7 @@
#include "refs.h"
#include "wildmatch.h"
#include "object-store.h"
+#include "repository.h"
#include "commit.h"
#include "remote.h"
#include "color.h"
@@ -806,7 +807,8 @@ static void *get_obj(const struct object_id *oid, struct object **obj, unsigned
void *buf = read_object_file(oid, &type, sz);
if (buf)
- *obj = parse_object_buffer(oid, type, *sz, buf, eaten);
+ *obj = parse_object_buffer(the_repository, oid, type, *sz,
+ buf, eaten);
else
*obj = NULL;
return buf;
@@ -1923,7 +1925,7 @@ static const struct object_id *match_points_at(struct oid_array *points_at,
if (oid_array_lookup(points_at, oid) >= 0)
return oid;
- obj = parse_object(oid);
+ obj = parse_object(the_repository, oid);
if (!obj)
die(_("malformed object at '%s'"), refname);
if (obj->type == OBJ_TAG)
@@ -2033,7 +2035,8 @@ static int ref_filter_handler(const char *refname, const struct object_id *oid,
* non-commits early. The actual filtering is done later.
*/
if (filter->merge_commit || filter->with_commit || filter->no_commit || filter->verbose) {
- commit = lookup_commit_reference_gently(oid, 1);
+ commit = lookup_commit_reference_gently(the_repository, oid,
+ 1);
if (!commit)
return 0;
/* We perform the filtering for the '--contains' option... */
@@ -2390,7 +2393,8 @@ int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset)
if (get_oid(arg, &oid))
die(_("malformed object name %s"), arg);
- rf->merge_commit = lookup_commit_reference_gently(&oid, 0);
+ rf->merge_commit = lookup_commit_reference_gently(the_repository,
+ &oid, 0);
if (!rf->merge_commit)
return opterror(opt, "must point to a commit", 0);