]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin/checkout.c
Merge branch 'em/checkout-orphan'
[git.git] / builtin / checkout.c
index 347927788b53031f0ada6bc3394940255637ad2c..c3825219c1efbd4939af6d18bcad6efcfa74f406 100644 (file)
@@ -150,7 +150,7 @@ static int checkout_merged(int pos, struct checkout *state)
        read_mmblob(&ours, active_cache[pos+1]->sha1);
        read_mmblob(&theirs, active_cache[pos+2]->sha1);
 
-       status = ll_merge(&result_buf, path, &ancestor,
+       status = ll_merge(&result_buf, path, &ancestor, "base",
                          &ours, "ours", &theirs, "theirs", 0);
        free(ancestor.ptr);
        free(ours.ptr);
@@ -440,6 +440,7 @@ static int merge_working_tree(struct checkout_opts *opts,
                        ret = reset_tree(new->commit->tree, opts, 1);
                        if (ret)
                                return ret;
+                       o.ancestor = old->name;
                        o.branch1 = new->name;
                        o.branch2 = "local";
                        merge_trees(&o, new->commit->tree, work,