[PATCH 21/34] sequencer (rebase -i): record interrupted commits in rewritten, too
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 31, 2016, 08:55 UTC
- Message-ID
- <556caa4188ba74731c84947b26b91939eb0a98a7.1472633606.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1472633606.git.johannes.schindelin@gmx.de>
When continuing after a `pick` command failed, we want that commit to show up in the rewritten-list (and its notes to be rewritten), too.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- sequencer.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/sequencer.c b/sequencer.c index a5e18f3..a00d349 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2023,6 +2023,17 @@ int sequencer_continue(struct replay_opts *opts) return error_dirty_index(opts); todo_list.current++; } + else if (file_exists(rebase_path_stopped_sha())) { + struct strbuf buf = STRBUF_INIT; + struct object_id oid; + + if (read_oneliner(&buf, rebase_path_stopped_sha(), 1)) { + if (!get_sha1_committish(buf.buf, oid.hash)) + record_in_rewritten(&oid, + peek_command(&todo_list, 0)); + } + strbuf_release(&buf); + } res = pick_commits(&todo_list, opts); todo_list_release(&todo_list);
-- 2.10.0.rc2.102.g5c102ec