Skip to content

Commit 4a5146f

Browse files
dschogitster
authored andcommitted
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>
1 parent 4b83ce9 commit 4a5146f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sequencer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,9 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
17691769
intend_to_amend();
17701770
return error_failed_squash(item->commit, opts,
17711771
item->arg_len, item->arg);
1772-
}
1772+
} else if (res && is_rebase_i(opts))
1773+
return res | error_with_patch(item->commit,
1774+
item->arg, item->arg_len, opts, res, 0);
17731775
} else if (item->command == TODO_EXEC) {
17741776
char *end_of_arg = (char *)(item->arg + item->arg_len);
17751777
int saved = *end_of_arg;

0 commit comments

Comments
 (0)