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:
Nguyễn Thái Ngọc Duy
2018-09-21 17:57:29 +02:00
committed by Junio C Hamano
parent f4a55b2797
commit 7e196c3a28
5 changed files with 28 additions and 19 deletions

View File

@ -728,8 +728,9 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
die(_("unable to write %s"), get_index_file());
return clean ? 0 : 1;
} else {
return try_merge_command(strategy, xopts_nr, xopts,
common, head_arg, remoteheads);
return try_merge_command(the_repository,
strategy, xopts_nr, xopts,
common, head_arg, remoteheads);
}
}
@ -1470,7 +1471,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
goto done;
}
if (checkout_fast_forward(&head_commit->object.oid,
if (checkout_fast_forward(the_repository,
&head_commit->object.oid,
&commit->object.oid,
overwrite_ignore)) {
ret = 1;