]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'pw/rebase-i-error-message'
authorJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2024 22:45:15 +0000 (15:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2024 22:45:15 +0000 (15:45 -0700)
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()

1  2 
advice.c
builtin/rebase.c
sequencer.c
sequencer.h

diff --cc advice.c
Simple merge
index 4506bae768a4c91787574a5cceaddbc3fe812b63,a33a2ed413aa0690e39fd7303c935bca5a225049..e3a8e74cfc25c89243397f62e3b09b8165c3ed6b
@@@ -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,
diff --cc sequencer.c
Simple merge
diff --cc sequencer.h
Simple merge