1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 09:16:10 +02:00

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>
This commit is contained in:
Johannes Schindelin 2017-01-02 16:28:20 +01:00 committed by Junio C Hamano
parent 25cb8df97c
commit ca98c6d487

View File

@ -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);