From: Junio C Hamano Date: Thu, 20 Jun 2024 22:45:15 +0000 (-0700) Subject: Merge branch 'pw/rebase-i-error-message' X-Git-Tag: v2.46.0-rc0~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83ac567781b53f7101c2a9b44462df447bbdc2c6;p=thirdparty%2Fgit.git Merge branch 'pw/rebase-i-error-message' When the user adds to "git rebase -i" instruction to "pick" a merge commit, the error experience is not pleasant. Such an error is now caught earlier in the process that parses the todo list. * pw/rebase-i-error-message: rebase -i: improve error message when picking merge rebase -i: pass struct replay_opts to parse_insn_line() --- 83ac567781b53f7101c2a9b44462df447bbdc2c6 diff --cc builtin/rebase.c index 4506bae768,a33a2ed413..e3a8e74cfc --- a/builtin/rebase.c +++ b/builtin/rebase.c @@@ -307,9 -296,9 +308,9 @@@ static int do_interactive_rebase(struc if (ret) error(_("could not generate todo list")); else { - discard_index(&the_index); + discard_index(the_repository->index); - if (todo_list_parse_insn_buffer(the_repository, todo_list.buf.buf, - &todo_list)) + if (todo_list_parse_insn_buffer(the_repository, &replay, + todo_list.buf.buf, &todo_list)) BUG("unusable todo list"); ret = complete_action(the_repository, &replay, flags,