summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-01-02 15:27:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-09 22:57:30 (GMT)
commit4a5146f9d2f739803b8fde643e02c2a9474fb0e8 (patch)
tree1f1f2a5b3d82af0aa0f583aeb6ce355a3d42b0f6 /sequencer.c
parent4b83ce9f6772451d4582dc1f0891790acbdf4eb1 (diff)
downloadgit-4a5146f9d2f739803b8fde643e02c2a9474fb0e8.zip
git-4a5146f9d2f739803b8fde643e02c2a9474fb0e8.tar.gz
git-4a5146f9d2f739803b8fde643e02c2a9474fb0e8.tar.bz2
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 80b2b2a..a2002f1 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -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;