diff options
Diffstat (limited to 'builtin/merge-tree.c')
| -rw-r--r-- | builtin/merge-tree.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index 60eaf0ca9f..8bdb439131 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -13,7 +13,6 @@ #include "parse-options.h" #include "repository.h" #include "blob.h" -#include "exec-cmd.h" #include "merge-blobs.h" #include "quote.h" #include "tree.h" @@ -477,8 +476,9 @@ static int real_merge(struct merge_tree_options *o, * Get the merge bases, in reverse order; see comment above * merge_incore_recursive in merge-ort.h */ - merge_bases = repo_get_merge_bases(the_repository, parent1, - parent2); + if (repo_get_merge_bases(the_repository, parent1, + parent2, &merge_bases) < 0) + exit(128); if (!merge_bases && !o->allow_unrelated_histories) die(_("refusing to merge unrelated histories")); merge_bases = reverse_commit_list(merge_bases); @@ -591,7 +591,8 @@ int cmd_merge_tree(int argc, const char **argv, const char *prefix) if (o.mode == MODE_TRIVIAL) die(_("--trivial-merge is incompatible with all other options")); if (merge_base) - die(_("--merge-base is incompatible with --stdin")); + die(_("options '%s' and '%s' cannot be used together"), + "--merge-base", "--stdin"); line_termination = '\0'; while (strbuf_getline_lf(&buf, stdin) != EOF) { struct strbuf **split; |
