]> git.ipfire.org Git - thirdparty/git.git/blobdiff - ref-filter.c
t5318: avoid unnecessary command substitutions
[thirdparty/git.git] / ref-filter.c
index fa3685d91f0464a28ef13102a1672215d4ec5177..9b2da883926dcee0210b5fd0b0051ee84f9adadb 100644 (file)
@@ -3,6 +3,8 @@
 #include "parse-options.h"
 #include "refs.h"
 #include "wildmatch.h"
+#include "object-store.h"
+#include "repository.h"
 #include "commit.h"
 #include "remote.h"
 #include "color.h"
@@ -805,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;
@@ -1710,7 +1713,7 @@ static enum contains_result contains_tag_algo(struct commit *candidate,
 
        for (p = want; p; p = p->next) {
                struct commit *c = p->item;
-               load_commit_graph_info(c);
+               load_commit_graph_info(the_repository, c);
                if (c->generation < cutoff)
                        cutoff = c->generation;
        }
@@ -1913,7 +1916,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)
@@ -2023,7 +2026,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... */
@@ -2380,7 +2384,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);