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 <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Phillip Wood committed Jul 15, 2026 at 16:21 UTC 18f5750beb14c13f1a140361b6a0459764ec0364
1 file changed +6
sequencer.c
+6
index eaffa8ebb8..1db844100a 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 then res == -1, but we don't + * want reschedule the last command because the picking the + * commit was successful. + */ + res = !!res; }