prepare the builtins for a libified merge_recursive()
[gitweb.git] / builtin / checkout.c
index 27c1a05246c21278a730698bd7de85eccc96d721..07dea3bc814ba26edd13a0e3ae73b3298958c3e9 100644 (file)
@@ -567,8 +567,10 @@ static int merge_working_tree(const struct checkout_opts *opts,
                        o.ancestor = old->name;
                        o.branch1 = new->name;
                        o.branch2 = "local";
-                       merge_trees(&o, new->commit->tree, work,
+                       ret = merge_trees(&o, new->commit->tree, work,
                                old->commit->tree, &result);
+                       if (ret < 0)
+                               exit(128);
                        ret = reset_tree(new->commit->tree, opts, 0,
                                         writeout_error);
                        if (ret)