Skip to content

Commit 350cb33

Browse files
committed
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>
1 parent dfd11c4 commit 350cb33

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

sequencer.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,19 @@ int sequencer_continue(struct replay_opts *opts)
19941994
return error_dirty_index(opts);
19951995
todo_list.current++;
19961996
}
1997+
else if (file_exists(stopped_sha())) {
1998+
struct strbuf buf = STRBUF_INIT;
1999+
struct object_id oid;
2000+
2001+
if (strbuf_read_file(&buf, stopped_sha(), 0) > 0) {
2002+
strbuf_trim(&buf);
2003+
if (!get_sha1_committish(buf.buf, oid.hash))
2004+
record_in_rewritten(&oid,
2005+
peek_command(&todo_list, 0));
2006+
}
2007+
strbuf_release(&buf);
2008+
}
2009+
19972010
res = pick_commits(&todo_list, opts);
19982011
todo_list_release(&todo_list);
19992012
return res;

0 commit comments

Comments
 (0)