]> git.ipfire.org Git - thirdparty/git.git/blobdiff - apply.c
object-name.h: move declarations for object-name.c functions from cache.h
[thirdparty/git.git] / apply.c
diff --git a/apply.c b/apply.c
index 57f45cedd2b360bf76c4dc7c8c78d833939bde28..7e40f53ec4c2b568df44ba87b584ccaed99e9b15 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -8,20 +8,28 @@
  */
 
 #include "cache.h"
+#include "abspath.h"
+#include "alloc.h"
 #include "config.h"
 #include "object-store.h"
 #include "blob.h"
 #include "delta.h"
 #include "diff.h"
 #include "dir.h"
+#include "environment.h"
+#include "gettext.h"
+#include "hex.h"
 #include "xdiff-interface.h"
 #include "ll-merge.h"
 #include "lockfile.h"
+#include "object-name.h"
 #include "parse-options.h"
 #include "quote.h"
 #include "rerere.h"
 #include "apply.h"
 #include "entry.h"
+#include "setup.h"
+#include "wrapper.h"
 
 struct gitdiff_data {
        struct strbuf *root;
@@ -3201,7 +3209,8 @@ static int apply_binary(struct apply_state *state,
                unsigned long size;
                char *result;
 
-               result = read_object_file(&oid, &type, &size);
+               result = repo_read_object_file(the_repository, &oid, &type,
+                                              &size);
                if (!result)
                        return error(_("the necessary postimage %s for "
                                       "'%s' cannot be read"),
@@ -3264,7 +3273,8 @@ static int read_blob_object(struct strbuf *buf, const struct object_id *oid, uns
                unsigned long sz;
                char *result;
 
-               result = read_object_file(oid, &type, &sz);
+               result = repo_read_object_file(the_repository, oid, &type,
+                                              &sz);
                if (!result)
                        return -1;
                /* XXX read_sha1_file NUL-terminates */
@@ -3492,7 +3502,8 @@ static int resolve_to(struct image *image, const struct object_id *result_id)
 
        clear_image(image);
 
-       image->buf = read_object_file(result_id, &type, &size);
+       image->buf = repo_read_object_file(the_repository, result_id, &type,
+                                          &size);
        if (!image->buf || type != OBJ_BLOB)
                die("unable to read blob object %s", oid_to_hex(result_id));
        image->len = size;