From: Andy Koppe <andy.koppe@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Kousik Sanagavarapu <five231003@gmail.com>,
Liam Beguin <liambeguin@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 2/2] pretty: add '%aA' to show domain-part of email addresses
Date: Sat, 4 Nov 2023 09:51:56 +0000 [thread overview]
Message-ID: <9662afd1-a596-4d36-8c50-6c2e953a36cb@gmail.com> (raw)
In-Reply-To: <xmqqy1fegu5i.fsf@gitster.g>
On 04/11/2023 01:54, Junio C Hamano wrote:
> Andy Koppe <andy.koppe@gmail.com> writes:
>
>> I'm not sure that this is the right way to handle a missing '@' here
>> actually, because %al already returns the whole email field in that
>> case, which makes sense as the likes of the 'mail' command would
>> interpret it as a local username.
>
> We could expand "%am" to \C-h (\010) so that "%al@%am" would end up
> displaying the same as "%al" but that would be way too cute for its
> own worth ;-)
:)
Unfortunately it also wouldn't always work, because ^H only moves the
cursor, so if the next thing is a newline, the '@' wouldn't actually get
deleted.
> It is unfortunate that "%al@%am" cannot be the same as "%ae" for
> local-only address, but giving an empty string for "%am" if "%ae" is
> local-only would be the best we could do for our users, and certainly
> much better than giving the same as "%ae", as you said above.
I suppose "%@am" could mean prepending an '@' when a domain is present,
similar to how "% am" would mean prepending a space and "%+am" would
mean prepending a newline. With that, "%al%@am" would be equivalent to
"%ae".
But that then raises the question whether it should be implemented just
for "%@[ac][mM]", or for all placeholders. In any case, I don't think it
needs to be part of the changes at hand.
Andy
prev parent reply other threads:[~2023-11-04 9:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 23:16 [PATCH 0/2] pretty: add %aA to show domain-part of email addresses Liam Beguin
2023-10-26 23:16 ` [PATCH 1/2] doc: pretty-formats: add missing word Liam Beguin
2023-10-26 23:16 ` [PATCH 2/2] pretty: add '%aA' to show domain-part of email addresses Liam Beguin
2023-10-27 18:40 ` Kousik Sanagavarapu
2023-10-28 0:12 ` Junio C Hamano
2023-10-28 2:13 ` Jeff King
2023-10-28 3:22 ` Liam Beguin
2023-10-28 6:58 ` Andy Koppe
2023-10-28 7:02 ` Andy Koppe
2023-10-30 9:10 ` Jeff King
2023-11-01 19:06 ` Liam Beguin
2023-10-29 23:53 ` Junio C Hamano
2023-11-20 20:21 ` Junio C Hamano
2023-12-10 21:07 ` Liam Beguin
2023-10-28 2:20 ` Liam Beguin
2023-10-28 15:27 ` Oswald Buddenhagen
2023-10-28 21:11 ` Andy Koppe
2023-11-03 8:22 ` Andy Koppe
2023-11-03 17:20 ` Kousik Sanagavarapu
2023-11-04 1:54 ` Junio C Hamano
2023-11-04 9:51 ` Andy Koppe [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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9662afd1-a596-4d36-8c50-6c2e953a36cb@gmail.com \
--to=andy.koppe@gmail.com \
--cc=five231003@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liambeguin@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).