diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-09-25 09:49:19 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-25 09:49:19 -0700 |
commit | ed520a8f270253f4a779aece1352b10fb9a689de (patch) | |
tree | d4e6f8d587781821b9d642ef23c7d60abaa2068e /builtin-checkout.c | |
parent | 1ad6d46235d135582d5cbb91ec0186b485c7b5c1 (diff) | |
parent | 4271666046b4b3e655eab88821096539099f3b14 (diff) | |
download | git-ed520a8f270253f4a779aece1352b10fb9a689de.tar.gz |
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
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r-- | builtin-checkout.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c index 9a0c173c14..075667c9cc 100644 --- a/builtin-checkout.c +++ b/builtin-checkout.c @@ -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; |