sequencer: remove unreachable exit condition in pick_commits()

This was introduced by 56dc3ab04 ("sequencer (rebase -i): implement the 'edit' command", 2017-01-02), and was pointless from the get-go: all early exits from the loop above are returns, so todo_list->current == todo_list->nr is an invariant after the loop. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Oswald Buddenhagen committed Sep 12, 2023 at 12:55 UTC 63642d58b4b28c3caba6d5ab0c3aa98c4ce54eaa
1 file changed -4
sequencer.c
-4
@@ -4823,10 +4823,6 @@ static int pick_commits(struct repository *r,
4823 struct strbuf head_ref = STRBUF_INIT, buf = STRBUF_INIT;
4824 struct stat st;
4825
4826 - /* Stopped in the middle, as planned? */
4827 - if (todo_list->current < todo_list->nr)
4828 - return 0;
4829 -
4826 if (read_oneliner(&head_ref, rebase_path_head_name(), 0) &&
4827 starts_with(head_ref.buf, "refs/")) {
4828 const char *msg;