Merge branch 'dl/compat-cleanup'
[gitweb.git] / merge-blobs.c
index fabb8c19ce983962b45c415f66c11236fa906bfe..ee0a0e90c94682f4d990b298d27d734d01d90581 100644 (file)
@@ -29,7 +29,12 @@ static void free_mmfile(mmfile_t *f)
        free(f->ptr);
 }
 
-static void *three_way_filemerge(const char *path, mmfile_t *base, mmfile_t *our, mmfile_t *their, unsigned long *size)
+static void *three_way_filemerge(struct index_state *istate,
+                                const char *path,
+                                mmfile_t *base,
+                                mmfile_t *our,
+                                mmfile_t *their,
+                                unsigned long *size)
 {
        int merge_status;
        mmbuffer_t res;
@@ -41,7 +46,8 @@ static void *three_way_filemerge(const char *path, mmfile_t *base, mmfile_t *our
         * common ancestor.
         */
        merge_status = ll_merge(&res, path, base, NULL,
-                               our, ".our", their, ".their", NULL);
+                               our, ".our", their, ".their",
+                               istate, NULL);
        if (merge_status < 0)
                return NULL;
 
@@ -49,7 +55,9 @@ static void *three_way_filemerge(const char *path, mmfile_t *base, mmfile_t *our
        return res.ptr;
 }
 
-void *merge_blobs(const char *path, struct blob *base, struct blob *our, struct blob *their, unsigned long *size)
+void *merge_blobs(struct index_state *istate, const char *path,
+                 struct blob *base, struct blob *our,
+                 struct blob *their, unsigned long *size)
 {
        void *res = NULL;
        mmfile_t f1, f2, common;
@@ -82,7 +90,7 @@ void *merge_blobs(const char *path, struct blob *base, struct blob *our, struct
                common.ptr = xstrdup("");
                common.size = 0;
        }
-       res = three_way_filemerge(path, &common, &f1, &f2, size);
+       res = three_way_filemerge(istate, path, &common, &f1, &f2, size);
        free_mmfile(&common);
 out_free_f2_f1:
        free_mmfile(&f2);