clean = merge_trees(&o,
head_tree,
next_tree, base_tree, &result);
+ strbuf_release(&o.obuf);
+ if (clean < 0)
+ return clean;
if (active_cache_changed &&
write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
if (!opts->strategy || !strcmp(opts->strategy, "recursive") || opts->action == REPLAY_REVERT) {
res = do_recursive_merge(base, next, base_label, next_label,
head, &msgbuf, opts);
+ if (res < 0)
+ return res;
write_message(&msgbuf, git_path_merge_msg());
} else {
struct commit_list *common = NULL;
if (action != opts->action) {
if (action == REPLAY_REVERT)
error((opts->action == REPLAY_REVERT)
- ? _("Cannot revert during a another revert.")
+ ? _("Cannot revert during another revert.")
: _("Cannot revert during a cherry-pick."));
else
error((opts->action == REPLAY_REVERT)