]> git.ipfire.org Git - thirdparty/git.git/blobdiff - merge-recursive.c
object-name.h: move declarations for object-name.c functions from cache.h
[thirdparty/git.git] / merge-recursive.c
index 2fd0aa968751f7defa06a51148f75bb5838b44d4..748a6799a303f36184c2ce3cf2e594b10437a951 100644 (file)
@@ -10,7 +10,6 @@
 #include "alloc.h"
 #include "attr.h"
 #include "blob.h"
-#include "builtin.h"
 #include "cache-tree.h"
 #include "commit.h"
 #include "commit-reach.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "dir.h"
+#include "environment.h"
+#include "gettext.h"
+#include "hex.h"
 #include "ll-merge.h"
 #include "lockfile.h"
+#include "object-name.h"
 #include "object-store.h"
 #include "repository.h"
 #include "revision.h"
@@ -29,6 +32,7 @@
 #include "tag.h"
 #include "tree-walk.h"
 #include "unpack-trees.h"
+#include "wrapper.h"
 #include "xdiff-interface.h"
 
 struct merge_options_internal {
@@ -412,7 +416,7 @@ static int unpack_trees_start(struct merge_options *opt,
 {
        int rc;
        struct tree_desc t[3];
-       struct index_state tmp_index = { NULL };
+       struct index_state tmp_index = INDEX_STATE_INIT(opt->repo);
 
        memset(&opt->priv->unpack_opts, 0, sizeof(opt->priv->unpack_opts));
        if (opt->priv->call_depth)
@@ -951,7 +955,8 @@ static int update_file_flags(struct merge_options *opt,
                        goto update_index;
                }
 
-               buf = read_object_file(&contents->oid, &type, &size);
+               buf = repo_read_object_file(the_repository, &contents->oid,
+                                           &type, &size);
                if (!buf) {
                        ret = err(opt, _("cannot read object %s '%s'"),
                                  oid_to_hex(&contents->oid), path);
@@ -3021,7 +3026,7 @@ static int read_oid_strbuf(struct merge_options *opt,
        void *buf;
        enum object_type type;
        unsigned long size;
-       buf = read_object_file(oid, &type, &size);
+       buf = repo_read_object_file(the_repository, oid, &type, &size);
        if (!buf)
                return err(opt, _("cannot read object %s"), oid_to_hex(oid));
        if (type != OBJ_BLOB) {
@@ -3592,7 +3597,7 @@ static int merge_recursive_internal(struct merge_options *opt,
        }
 
        if (!merge_bases) {
-               merge_bases = get_merge_bases(h1, h2);
+               merge_bases = repo_get_merge_bases(the_repository, h1, h2);
                merge_bases = reverse_commit_list(merge_bases);
        }
 
@@ -3797,7 +3802,7 @@ static struct commit *get_ref(struct repository *repo,
                return make_virtual_commit(repo, (struct tree*)object, name);
        if (object->type != OBJ_COMMIT)
                return NULL;
-       if (parse_commit((struct commit *)object))
+       if (repo_parse_commit(repo, (struct commit *)object))
                return NULL;
        return (struct commit *)object;
 }