From 8b7330ca47261e414dd72e6ee6233dbb355ce7cf Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Tue, 30 Jun 2026 16:28:54 +0100 Subject: [PATCH] sequencer: never reschedule on failed commit If "git commit" fails to run then run_git_commit() returns -1 which causes the current command to be rescheduled. This is incorrect as we have successfully picked the commit and have written all the state files we need to successfully commit when the user continues. Fix this by converting -1 to 1 which matches what do_merge() does. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sequencer.c b/sequencer.c index e6626c4db4..d7e439b1fe 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2542,6 +2542,12 @@ fast_forward_edit: res = run_git_commit(NULL, reflog_action, opts, flags); *check_todo = 1; } + /* + * If "git commit" failed to run than res == -1 but we dont + * want reschedule the last command because the picking the + * commit was successful. + */ + res = !!res; } -- 2.47.3