[PATCH v2 04/10] sequencer: never reschedule on failed commit
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jul 13, 2026, 13:17 UTC
- Message-ID
- <fc89e77c6e890993d314cfedc53b4e4bb5b1ad5f.1783948637.git.phillip.wood@dunelm.org.uk>
- In-Reply-To
- <cover.1783948637.git.phillip.wood@dunelm.org.uk>
From: Phillip Wood <phillip.wood@dunelm.org.uk>
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> --- sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/sequencer.c b/sequencer.c index 21dd5ec9799..c97b996bebc 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2542,6 +2542,12 @@ static int do_pick_commit(struct repository *r, 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; }
-- 2.54.0.200.gfd8d68259e3