From: "Rubén Justo" <rjusto@gmail.com>
To: phillip.wood@dunelm.org.uk,
Phillip Wood via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Cc: Stefan Haller <lists@haller-berlin.de>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] rebase -i: improve error message when picking merge
Date: Sat, 6 Apr 2024 16:24:23 +0200 [thread overview]
Message-ID: <7e4eae67-8db9-4be3-8b96-e2e89fa82abf@gmail.com> (raw)
In-Reply-To: <dbb4615c-443f-474f-a33c-cfb4486d436b@gmail.com>
On Fri, Apr 05, 2024 at 10:30:37AM +0100, phillip.wood123@gmail.com wrote:
> Hi Rubén
>
> Thanks for trying this out.
>
> On 04/04/2024 20:44, Rubén Justo wrote:
> > On Mon, Feb 26, 2024 at 10:58:07AM +0000, Phillip Wood via GitGitGadget wrote:
> > The change makes sense, but this is confusing to me:
> >
> > With this ...
> >
> > $ GIT_EDITOR='echo pick 17381ab62a >' ./git rebase -i HEAD
> > error: 'pick' does not accept merge commits, please use 'merge -C'
> > error: invalid line 1: pick 17381ab62a
> > You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
> > Or you can abort the rebase with 'git rebase --abort'.
> >
> > ... I find these repeated messages confusing:
> >
> > $ GIT_EDITOR=: ./git rebase --edit-todo
> > error: 'pick' does not accept merge commits, please use 'merge -C'
> > error: invalid line 1: pick 17381ab62a
>
> The two lines above are printed when "rebase --edit-todo" loads the todo
> list for the user to edit. With a real editor rather than ":" we would then
> print
>
> hint: Waiting for your editor to close the file ...
>
> Then hopefully the user would fix the errors. If not then when the editor
> had finished we'd print the remaining errors as below.
>
> > error: 'pick' does not accept merge commits, please use 'merge -C'
> > error: invalid line 1: pick 17381ab62a
> > You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
> > Or you can abort the rebase with 'git rebase --abort'.
>
> I think that printing the error messages when the todo list is parsed before
> it is given to the user to edit is helpful as it reminds the user what the
> problem is. Your test looks confusing because it doesn't really simulate the
> user editing the todo list.
Certainly, the test was not clear to express my confusion.
The ones that are printed _before_ the editor is run are the ones that
confuse me, because when the user exits the editor we leave those
lines there:
$ GIT_EDITOR='sed -i s/pick/merge/' ./git rebase --edit
error: 'pick' does not accept merge commits, please use 'merge -C'
error: invalid line 1: pick 17381ab62a
But maybe it is my interpretation. Your reasoning of giving it as a
help to the user makes sense.
Thank you for your explanations.
> Best Wishes
>
> Phillip
next prev parent reply other threads:[~2024-04-06 14:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 10:58 [PATCH] rebase -i: improve error message when picking merge Phillip Wood via GitGitGadget
2024-04-03 13:42 ` phillip.wood123
2024-04-04 6:08 ` Patrick Steinhardt
2024-04-04 6:08 ` Patrick Steinhardt
2024-04-04 15:29 ` phillip.wood123
2024-04-04 19:44 ` Rubén Justo
2024-04-05 9:30 ` phillip.wood123
2024-04-06 14:24 ` Rubén Justo [this message]
2024-04-07 13:55 ` phillip.wood123
2024-04-08 14:16 ` [PATCH v2 0/2] " Phillip Wood via GitGitGadget
2024-04-08 14:16 ` [PATCH v2 1/2] rebase -i: pass struct replay_opts to parse_insn_line() Phillip Wood via GitGitGadget
2024-04-09 4:03 ` Patrick Steinhardt
2024-04-08 14:16 ` [PATCH v2 2/2] rebase -i: improve error message when picking merge Phillip Wood via GitGitGadget
2024-04-08 22:29 ` Junio C Hamano
2024-04-09 4:03 ` Patrick Steinhardt
2024-04-09 5:08 ` Junio C Hamano
2024-04-09 6:04 ` Patrick Steinhardt
2024-04-09 15:04 ` Phillip Wood
2024-04-09 19:56 ` Junio C Hamano
2024-04-12 13:24 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e4eae67-8db9-4be3-8b96-e2e89fa82abf@gmail.com \
--to=rjusto@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=lists@haller-berlin.de \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).