summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-01-02 15:28:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-09 22:57:30 (GMT)
commitca98c6d4870d9743ee1fab9f70d1f455895811d6 (patch)
tree007e6a376c60fa63fa81b153b66ee8140a119fd5 /sequencer.c
parent25cb8df97c9be26d7638e79595d361fbc40b65a0 (diff)
downloadgit-ca98c6d4870d9743ee1fab9f70d1f455895811d6.zip
git-ca98c6d4870d9743ee1fab9f70d1f455895811d6.tar.gz
git-ca98c6d4870d9743ee1fab9f70d1f455895811d6.tar.bz2
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 50380a1..d7273fd 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);