From: Johannes Schindelin Date: Mon, 2 Jan 2017 15:28:20 +0000 (+0100) Subject: sequencer (rebase -i): record interrupted commits in rewritten, too X-Git-Tag: v2.12.0-rc0~38^2~14 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ca98c6d4870d9743ee1fab9f70d1f455895811d6?ds=sidebyside;hp=25cb8df97c9be26d7638e79595d361fbc40b65a0 sequencer (rebase -i): record interrupted commits in rewritten, too 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 Signed-off-by: Junio C Hamano --- diff --git a/sequencer.c b/sequencer.c index 50380a15b8..d7273fd1b3 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2060,6 +2060,14 @@ int sequencer_continue(struct replay_opts *opts) goto release_todo_list; } 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) && + !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);