Re: Possible bug in git-rebase man page
- From
- Stefan Haller <lists@haller-berlin.de>
- Date
- Apr 6, 2023, 10:48 UTC
- Message-ID
- <f3e522f6-294d-4c08-b261-34d8e5b03b46@haller-berlin.de>
- In-Reply-To
- <51aca4bd-0f2b-0689-4b51-260349cc4151@gmail.com>
On 06.04.23 11:49, Phillip Wood wrote:
Show 15 quoted lines
> Hi Stefan > > On 05/04/2023 18:36, Stefan Haller wrote: >> The git-rebase documentation has an example for a git-rebase-todo file >> when --rebase-merges is used; one of the lines in that file is >> >> reset refactor-button # Use the Button class for all buttons >> >> From reading the code that parses the file, this doesn't seem to be a >> valid line; as far as I can see, comments are not supported for reset or >> label. The label is the entire rest of the line after the command. > > You're right that comments are not supported for labels, but for the > reset command do_reset() ignores everything after the label so it does > effectively support comments.
I don't follow; do_reset() simply uses whatever is stored in item->arg_len, and this is set to go until the end of the line for "label" and "reset" in parse_insn_line().
> I've got some patches to support comments on other commands which > I'll hopefully submit before too long.
Hm, for label and reset this will make it harder for third-parties parsing todo files. What's a real-world benefit of supporting comments for these?
-Stefan