path: root/sequencer.h
diff options
authorPhillip Wood <>2019-04-16 10:18:41 (GMT)
committerJunio C Hamano <>2019-04-17 02:31:37 (GMT)
commitb07d9bfd171d881a02d110b68673c58cb63e9f62 (patch)
tree50cb587f5e0e614a0892c2d46998c05d21a44f86 /sequencer.h
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
commit/reset: try to clean up sequencer state
When cherry-picking or reverting a sequence of commits and if the final pick/revert has conflicts and the user uses `git commit` to commit the conflict resolution and does not run `git cherry-pick --continue` then the sequencer state is left behind. This can cause problems later. In my case I cherry-picked a sequence of commits the last one of which I committed with `git commit` after resolving some conflicts, then a while later, on a different branch I aborted a revert which rewound my HEAD to the end of the cherry-pick sequence on the previous branch. Avoid this potential problem by removing the sequencer state if we're committing or resetting the final pick in a sequence. Signed-off-by: Phillip Wood <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'sequencer.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index 4d505b3..6c7cf8d 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -144,3 +144,4 @@ int read_author_script(const char *path, char **name, char **email, char **date,
void parse_strategy_opts(struct replay_opts *opts, char *raw_opts);
int write_basic_state(struct replay_opts *opts, const char *head_name,
const char *onto, const char *orig_head);
+void sequencer_post_commit_cleanup(struct repository *r);