]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.c
Merge branch 'mr/vcs-svn-printf-ulong' into maint
[thirdparty/git.git] / sequencer.c
index 7b1eb146455b4b36a1e52298e9fc2405f0a30776..3804fa931d819f035ad6b3159cb8efa1745693d0 100644 (file)
@@ -293,6 +293,9 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
        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))
@@ -559,6 +562,8 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
        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;
@@ -697,7 +702,7 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts *
        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)