From: Phillip Wood <phillip.wood123@gmail.com>
To: Stefan Haller <lists@haller-berlin.de>,
phillip.wood@dunelm.org.uk, git@vger.kernel.org
Cc: johannes.schindelin@gmx.de
Subject: Re: Possible bug in git-rebase man page
Date: Tue, 11 Apr 2023 10:50:36 +0100 [thread overview]
Message-ID: <53849a41-405c-e488-8c9f-49b211d9a7d4@gmail.com> (raw)
In-Reply-To: <dda64e68-1390-0b4d-bb93-65f745ab1300@haller-berlin.de>
On 07/04/2023 07:12, Stefan Haller wrote:
> On 06.04.23 14:07, Phillip Wood wrote:
> Ah, I missed that, thanks. But it does this only after special-casing
> the "[new root]" label, which does contain a space and needs to go to
> the end of the line. This is weird.
I think it is by design. Unlike normal labels "[new root]" is not a ref
and by choosing a name that is not a valid refname it will never
conflict with a normal label.
> This whole topic started because the todo parser that we are using in
> lazygit has a bug where it doesn't recognize the "[new root]" label
> properly, and this is because it does split the line at the first
> whitespace, but without special-casing "[new root]" like git does.
>
> How would you recommend we fix this? We could replicate git's current
> behavior exactly, but then this would break when you introduce comments
> later. Or we could anticipate that comments are added at some point, and
> already split the line at the first # (trimming whitespace before that).
> This would not exactly match git's current behavior, but it would be
> good enough because git never actually uses whitespace in label or reset
> lines except for the "[new root]" case.
>
> I'm leaning towards the second option myself. Any thoughts?
I'd got for a slight variation of the second one where you just ignore
everything after the required arguments for each command just like the
reset command does - it does not require the comment to start with a
'#', it will accept "reset mylabel this is a comment".
Best Wishes
Phillip
>
> -Stefan
prev parent reply other threads:[~2023-04-11 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 17:36 Possible bug in git-rebase man page Stefan Haller
2023-04-06 9:49 ` Phillip Wood
2023-04-06 10:48 ` Stefan Haller
2023-04-06 12:07 ` Phillip Wood
2023-04-07 6:12 ` Stefan Haller
2023-04-11 9:50 ` Phillip Wood [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53849a41-405c-e488-8c9f-49b211d9a7d4@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--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.
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 NNTP newsgroup(s).