We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8fe4f2 commit 3dd0ebdCopy full SHA for 3dd0ebd
1 file changed
sequencer.c
@@ -1812,8 +1812,13 @@ static int commit_staged_changes(struct replay_opts *opts)
1812
1813
if (has_unstaged_changes(1))
1814
return error(_("Cannot rebase: You have unstaged changes."));
1815
- if (!has_uncommitted_changes(0))
+ if (!has_uncommitted_changes(0)) {
1816
+ const char *cherry_pick_head = git_path("CHERRY_PICK_HEAD");
1817
+
1818
+ if (file_exists(cherry_pick_head) && unlink(cherry_pick_head))
1819
+ return error("Could not remove CHERRY_PICK_HEAD");
1820
return 0;
1821
+ }
1822
1823
if (file_exists(git_path_rebase_amend())) {
1824
struct strbuf rev = STRBUF_INIT;
0 commit comments