Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 18:57:28 +0300
committerJunio C Hamano <gitster@pobox.com>2018-09-21 19:48:10 +0300
commitf4a55b27977aeaddbfb73041be26701bcd3868a5 (patch)
treee5ad32d53210d753a2069f66ccf9182a13a84876 /merge-blobs.c
parent32eaa4688387d37398f0bc498335355a28efb0c7 (diff)
merge-blobs.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-blobs.c')
-rw-r--r--merge-blobs.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/merge-blobs.c b/merge-blobs.c
index 668fb2e05d..ee0a0e90c9 100644
--- a/merge-blobs.c
+++ b/merge-blobs.c
@@ -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;
@@ -42,7 +47,7 @@ static void *three_way_filemerge(const char *path, mmfile_t *base, mmfile_t *our
*/
merge_status = ll_merge(&res, path, base, NULL,
our, ".our", their, ".their",
- &the_index, NULL);
+ istate, NULL);
if (merge_status < 0)
return NULL;
@@ -50,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;
@@ -83,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);