summaryrefslogtreecommitdiff
path: root/builtin/merge-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/merge-tree.c')
-rw-r--r--builtin/merge-tree.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 9a6c8b4e4c..3ec7127b3a 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -18,6 +18,7 @@
#include "tree.h"
#include "config.h"
#include "strvec.h"
+#include "write-or-die.h"
static int line_termination = '\n';
@@ -575,7 +576,7 @@ int cmd_merge_tree(int argc,
};
/* Init merge options */
- init_ui_merge_options(&o.merge_options, the_repository);
+ init_basic_merge_options(&o.merge_options, the_repository);
/* Parse arguments */
original_argc = argc - 1; /* ignoring argv[0] */
@@ -600,7 +601,6 @@ int cmd_merge_tree(int argc,
line_termination = '\0';
while (strbuf_getline_lf(&buf, stdin) != EOF) {
struct strbuf **split;
- int result;
const char *input_merge_base = NULL;
split = strbuf_split(&buf, ' ');
@@ -617,15 +617,14 @@ int cmd_merge_tree(int argc,
if (input_merge_base && split[2] && split[3] && !split[4]) {
strbuf_rtrim(split[2]);
strbuf_rtrim(split[3]);
- result = real_merge(&o, input_merge_base, split[2]->buf, split[3]->buf, prefix);
+ real_merge(&o, input_merge_base, split[2]->buf, split[3]->buf, prefix);
} else if (!input_merge_base && !split[2]) {
- result = real_merge(&o, NULL, split[0]->buf, split[1]->buf, prefix);
+ real_merge(&o, NULL, split[0]->buf, split[1]->buf, prefix);
} else {
die(_("malformed input line: '%s'."), buf.buf);
}
+ maybe_flush_or_die(stdout, "stdout");
- if (result < 0)
- die(_("merging cannot continue; got unclean result of %d"), result);
strbuf_list_free(split);
}
strbuf_release(&buf);