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:27 +0300
committerJunio C Hamano <gitster@pobox.com>2018-09-21 19:48:10 +0300
commit32eaa4688387d37398f0bc498335355a28efb0c7 (patch)
treecef97cc234d7958b4c20d34e272baacdcc15ca48 /apply.c
parent5adbb403c24880b758149378bc7874d7617db4bc (diff)
ll-merge.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 'apply.c')
-rw-r--r--apply.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apply.c b/apply.c
index e485fbc6bc..ea111ab13f 100644
--- a/apply.c
+++ b/apply.c
@@ -3467,7 +3467,8 @@ static int load_preimage(struct apply_state *state,
return 0;
}
-static int three_way_merge(struct image *image,
+static int three_way_merge(struct apply_state *state,
+ struct image *image,
char *path,
const struct object_id *base,
const struct object_id *ours,
@@ -3483,7 +3484,9 @@ static int three_way_merge(struct image *image,
status = ll_merge(&result, path,
&base_file, "base",
&our_file, "ours",
- &their_file, "theirs", NULL);
+ &their_file, "theirs",
+ state->repo->index,
+ NULL);
free(base_file.ptr);
free(our_file.ptr);
free(their_file.ptr);
@@ -3595,7 +3598,7 @@ static int try_threeway(struct apply_state *state,
clear_image(&tmp_image);
/* in-core three-way merge between post and our using pre as base */
- status = three_way_merge(image, patch->new_name,
+ status = three_way_merge(state, image, patch->new_name,
&pre_oid, &our_oid, &post_oid);
if (status < 0) {
if (state->apply_verbosity > verbosity_silent)