Skip to content

Commit

Permalink
merge-recursive.c: remove implicit dependency on the_index
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
pclouds authored and gitster committed Jan 14, 2019
1 parent 3a7a698 commit 0d6caa2
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 75 deletions.
2 changes: 1 addition & 1 deletion builtin/am.c
Expand Up @@ -1545,7 +1545,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
* changes.
*/

init_merge_options(&o);
init_merge_options(&o, the_repository);

o.branch1 = "HEAD";
their_tree_name = xstrfmt("%.*s", linelen(state->msg), state->msg);
Expand Down
2 changes: 1 addition & 1 deletion builtin/checkout.c
Expand Up @@ -670,7 +670,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
* a pain; plumb in an option to set
* o.renormalize?
*/
init_merge_options(&o);
init_merge_options(&o, the_repository);
o.verbosity = 0;
work = write_tree_from_memory(&o);

Expand Down
2 changes: 1 addition & 1 deletion builtin/merge-recursive.c
Expand Up @@ -28,7 +28,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix)
struct merge_options o;
struct commit *result;

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

Expand Down
2 changes: 1 addition & 1 deletion builtin/merge.c
Expand Up @@ -702,7 +702,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
return 2;
}

init_merge_options(&o);
init_merge_options(&o, the_repository);
if (!strcmp(strategy, "subtree"))
o.subtree_shift = "";

Expand Down

0 comments on commit 0d6caa2

Please sign in to comment.