diff --git a/merge-recursive.c b/merge-recursive.c index 11869ad81c..47f67079f3 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -421,7 +421,7 @@ static int unpack_trees_start(struct merge_options *opt, { int rc; struct tree_desc t[3]; - struct index_state tmp_index = { NULL }; + /* struct index_state tmp_index = { NULL }; */ memset(&opt->priv->unpack_opts, 0, sizeof(opt->priv->unpack_opts)); if (opt->priv->call_depth) @@ -432,7 +432,7 @@ static int unpack_trees_start(struct merge_options *opt, opt->priv->unpack_opts.head_idx = 2; opt->priv->unpack_opts.fn = threeway_merge; opt->priv->unpack_opts.src_index = opt->repo->index; - opt->priv->unpack_opts.dst_index = &tmp_index; + opt->priv->unpack_opts.dst_index = opt->repo->index; opt->priv->unpack_opts.aggressive = !merge_detect_rename(opt); setup_unpack_trees_porcelain(&opt->priv->unpack_opts, "merge"); @@ -449,8 +449,8 @@ static int unpack_trees_start(struct merge_options *opt, * saved copy. (verify_uptodate() checks src_index, and the original * index is the one that had the necessary modification timestamps.) */ - opt->priv->orig_index = *opt->repo->index; - *opt->repo->index = tmp_index; + /* opt->priv->orig_index = *opt->repo->index; */ + /* *opt->repo->index = tmp_index; */ opt->priv->unpack_opts.src_index = &opt->priv->orig_index; return rc;