Re: [PATCH] rebase -i: allow a comment after a "break" command
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jan 12, 2023, 16:29 UTC
- Message-ID
- <59bf57cb-fd8b-b814-b45e-c8088e743d5c@dunelm.org.uk>
- In-Reply-To
- <xmqq358fu4vr.fsf@gitster.g>
Hi Junio
On 12/01/2023 15:52, Junio C Hamano wrote:
Show 16 quoted lines
> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes: > >> From: Phillip Wood <phillip.wood@dunelm.org.uk> >> >> When adding a "break" command to a rebase todo list it can be helpful to >> add a comment as a reminder as to what the user was planning to do when >> the rebase stopped. Anything following the command is interpreted as an >> argument to the command and results in an error. Change this so that a >> "break command may be followed by "# <comment>" in the same way as >> a "merge" command. Requiring the comment to begin with "# " allows the >> break command to start taking an argument in the future if that turns >> out to be useful. > > Why do we special case "break" and not give the same "comment is > emitted when the control reaches the insn in the todo list" for > others like "exec" or even "pick"?
I think the break command is a bit different to the others as it stops the rebase and so the user may want a reminder of what they were planning to do when it stopped. The other commands just pick a commit or run a command so I'm not sure what the comment would be for.
Show 8 quoted lines
> Another comment with devil's advocate hat on is if we are better off > not adding "# this comment is emitted" at all, and instead do > > pick ... > pick ... > exec echo this comment is emitted > break > pick ...
That's a neat idea, maybe we should just add some documentation suggesting users do that?
Best Wishes
Phillip
>