From: Phillip Wood Date: Thu, 12 Jan 2023 16:20:53 GMT Subject: Re: [PATCH] rebase -i: allow a comment after a "break" command Message-ID: <4e2bb2da-0c42-ae9c-2a05-9b23db55c2ce@dunelm.org.uk> In-Reply-To: <230112.86pmbk0vvj.gmgdl@evledraar.gmail.com> On 12/01/2023 12:25, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Jan 12 2023, Phillip Wood via GitGitGadget wrote: > >> From: Phillip Wood >> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt >> index f9675bd24e6..511ace43db0 100644 >> --- a/Documentation/git-rebase.txt >> +++ b/Documentation/git-rebase.txt >> @@ -869,7 +869,9 @@ the files and/or the commit message, amend the commit, and continue >> rebasing. >> >> To interrupt the rebase (just like an "edit" command would do, but without >> -cherry-picking any commit first), use the "break" command. >> +cherry-picking any commit first), use the "break" command. A "break" >> +command may be followed by a comment beginning with `#` followed by a >> +space. > > You're missing a corresponding edit here to the help string in > append_todo_help(), as you note you're making "break" support what > "merge" does, and that help string documents that "merge" accepts a > comment, after this we don't do that for "break", but should one way or > the other (see below). Thanks, Andrei has already mentioned that, I'll update the todo help when I re-roll > I like this direction, but I don't see why we need to continue this > special-snowflakeness of only allowing specific commands to accept these > #-comments. > > Why not just have them all support it? It started with "merge", which as > 4c68e7ddb59 (sequencer: introduce the `merge` command, 2018-04-25) note > can be used for: > > merge -C baaabaaa abc # Merge the branch 'abc' into master > > As Olliver points out we should probably support "#" without the > following " ", which seems to be an accident of history & > over-strictness. It's not an accident, labels and commit names can begin with '#' so we need to support merge #parent1 #parent2 For "break" we could just not require '#' at all as we do for "reset