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>
This commit is contained in:

committed by
Junio C Hamano

parent
5adbb403c2
commit
32eaa46883
9
apply.c
9
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)
|
||||
|
Reference in New Issue
Block a user