Re: [PATCH] rebase -i: allow a comment after a "break" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio

On 12/01/2023 15:52, Junio C Hamano wrote:
"Phillip Wood via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>

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.

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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux