Skip to content

Commit 0d6caa2

Browse files
pcloudsgitster
authored andcommitted
merge-recursive.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>
1 parent 3a7a698 commit 0d6caa2

File tree

7 files changed

+91
-75
lines changed

7 files changed

+91
-75
lines changed

builtin/am.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
15451545
* changes.
15461546
*/
15471547

1548-
init_merge_options(&o);
1548+
init_merge_options(&o, the_repository);
15491549

15501550
o.branch1 = "HEAD";
15511551
their_tree_name = xstrfmt("%.*s", linelen(state->msg), state->msg);

builtin/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
670670
* a pain; plumb in an option to set
671671
* o.renormalize?
672672
*/
673-
init_merge_options(&o);
673+
init_merge_options(&o, the_repository);
674674
o.verbosity = 0;
675675
work = write_tree_from_memory(&o);
676676

builtin/merge-recursive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix)
2828
struct merge_options o;
2929
struct commit *result;
3030

31-
init_merge_options(&o);
31+
init_merge_options(&o, the_repository);
3232
if (argv[0] && ends_with(argv[0], "-subtree"))
3333
o.subtree_shift = "";
3434

builtin/merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
702702
return 2;
703703
}
704704

705-
init_merge_options(&o);
705+
init_merge_options(&o, the_repository);
706706
if (!strcmp(strategy, "subtree"))
707707
o.subtree_shift = "";
708708

0 commit comments

Comments
 (0)