Merge branch 'sb/config-write-fix'
[gitweb.git] / log-tree.c
index f2ca0fbd53fa3da7759b5d77d97b6816dfe23430..7443e5fcc74b7964c478327c6557d53eb4f6b425 100644 (file)
@@ -2,6 +2,7 @@
 #include "config.h"
 #include "diff.h"
 #include "object-store.h"
+#include "repository.h"
 #include "commit.h"
 #include "tag.h"
 #include "graph.h"
@@ -91,20 +92,20 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
 
        if (starts_with(refname, git_replace_ref_base)) {
                struct object_id original_oid;
-               if (!check_replace_refs)
+               if (!read_replace_refs)
                        return 0;
                if (get_oid_hex(refname + strlen(git_replace_ref_base),
                                &original_oid)) {
                        warning("invalid replace ref %s", refname);
                        return 0;
                }
-               obj = parse_object(&original_oid);
+               obj = parse_object(the_repository, &original_oid);
                if (obj)
                        add_name_decoration(DECORATION_GRAFTED, "replaced", obj);
                return 0;
        }
 
-       obj = parse_object(oid);
+       obj = parse_object(the_repository, oid);
        if (!obj)
                return 0;
 
@@ -125,7 +126,7 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
                if (!obj)
                        break;
                if (!obj->parsed)
-                       parse_object(&obj->oid);
+                       parse_object(the_repository, &obj->oid);
                add_name_decoration(DECORATION_REF_TAG, refname, obj);
        }
        return 0;
@@ -133,7 +134,7 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
 
 static int add_graft_decoration(const struct commit_graft *graft, void *cb_data)
 {
-       struct commit *commit = lookup_commit(&graft->oid);
+       struct commit *commit = lookup_commit(the_repository, &graft->oid);
        if (!commit)
                return 0;
        add_name_decoration(DECORATION_GRAFTED, "grafted", &commit->object);
@@ -497,12 +498,12 @@ static int show_one_mergetag(struct commit *commit,
        size_t payload_size, gpg_message_offset;
 
        hash_object_file(extra->value, extra->len, type_name(OBJ_TAG), &oid);
-       tag = lookup_tag(&oid);
+       tag = lookup_tag(the_repository, &oid);
        if (!tag)
                return -1; /* error message already given */
 
        strbuf_init(&verify_message, 256);
-       if (parse_tag_buffer(tag, extra->value, extra->len))
+       if (parse_tag_buffer(the_repository, tag, extra->value, extra->len))
                strbuf_addstr(&verify_message, "malformed mergetag\n");
        else if (is_common_merge(commit) &&
                 !oidcmp(&tag->tagged->oid,