Merge branch 'mv/merge-recursive'
* mv/merge-recursive: builtin-merge: release the lockfile in try_merge_strategy() merge-recursive: get rid of virtual_id merge-recursive: move current_{file,directory}_set to struct merge_options merge-recursive: move the global obuf to struct merge_options merge-recursive: get rid of the index_only global variable merge-recursive: move call_depth to struct merge_options cherry-pick/revert: make direct internal call to merge_tree() builtin-merge: avoid run_command_v_opt() for recursive and subtree merge-recursive: introduce merge_options merge-recursive.c: Add more generic merge_recursive_generic() Split out merge_recursive() to merge-recursive.c
This commit is contained in:
@ -293,6 +293,7 @@ static int merge_working_tree(struct checkout_opts *opts,
|
||||
*/
|
||||
struct tree *result;
|
||||
struct tree *work;
|
||||
struct merge_options o;
|
||||
if (!opts->merge)
|
||||
return 1;
|
||||
parse_commit(old->commit);
|
||||
@ -311,13 +312,17 @@ static int merge_working_tree(struct checkout_opts *opts,
|
||||
*/
|
||||
|
||||
add_files_to_cache(NULL, NULL, 0);
|
||||
work = write_tree_from_memory();
|
||||
init_merge_options(&o);
|
||||
o.verbosity = 0;
|
||||
work = write_tree_from_memory(&o);
|
||||
|
||||
ret = reset_tree(new->commit->tree, opts, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
merge_trees(new->commit->tree, work, old->commit->tree,
|
||||
new->name, "local", &result);
|
||||
o.branch1 = new->name;
|
||||
o.branch2 = "local";
|
||||
merge_trees(&o, new->commit->tree, work,
|
||||
old->commit->tree, &result);
|
||||
ret = reset_tree(new->commit->tree, opts, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user