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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jan 2, 2017 at 16:28 UTC
ca98c6d4870d9743ee1fab9f70d1f455895811d6
1 file changed
+8
sequencer.c
+8
@@ -2060,6 +2060,14 @@ int sequencer_continue(struct replay_opts *opts)
2060
goto release_todo_list;
2061
}
2062
todo_list.current++;
2063
+ } else if (file_exists(rebase_path_stopped_sha())) {
2064
+ struct strbuf buf = STRBUF_INIT;
2065
+ struct object_id oid;
2066
+
2067
+ if (read_oneliner(&buf, rebase_path_stopped_sha(), 1) &&
2068
+ !get_sha1_committish(buf.buf, oid.hash))
2069
+ record_in_rewritten(&oid, peek_command(&todo_list, 0));
2070
+ strbuf_release(&buf);
2071
}
2072
2073
res = pick_commits(&todo_list, opts);