sequencer (rebase -i): leave a patch upon error

When doing an interactive rebase, we want to leave a 'patch' file for
further inspection by the user (even if we never tried to actually apply
that patch, since we're cherry-picking instead).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2017-01-02 16:27:57 +01:00 коммит произвёл Junio C Hamano
Родитель 4b83ce9f67
Коммит 4a5146f9d2
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1769,7 +1769,9 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
intend_to_amend();
return error_failed_squash(item->commit, opts,
item->arg_len, item->arg);
}
} else if (res && is_rebase_i(opts))
return res | error_with_patch(item->commit,
item->arg, item->arg_len, opts, res, 0);
} else if (item->command == TODO_EXEC) {
char *end_of_arg = (char *)(item->arg + item->arg_len);
int saved = *end_of_arg;