git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
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: Tue, 21 Nov 2023 05:21:43 +0900	[thread overview]
Message-ID: <xmqqwmucjhuw.fsf@gitster.g> (raw)
In-Reply-To: <xmqqv8apgf4y.fsf@gitster.g> (Junio C. Hamano's message of "Mon, 30 Oct 2023 08:53:01 +0900")

Junio C Hamano <gitster@pobox.com> writes:

> Another line of thought is perhaps it is potentially useful to teach
> the --format= machinery to be a bit more programmable, e.g. allowing
> to compute a substring of an existing field %{%aE#*@} without having
> to waste a letter each for the local part and domain part.  But as I
> already said, we are now talking about "postprocessing", and adding
> complexity to our codebase only to have incomplete flexibility may
> not be worth it.  A more specific %(authoremail:localpart) and its
> domain counterpart may be easier to explain and understand.
>
> In any case, it is a bit too late to say "let's not waste the
> precious single letter namespace to add useless features", as we
> have come way too far, so I do not mind too much using a currently
> unused letter $X for yet another author and committer trait.

When I wrote the above, I somehow forgot the existing work in the
ref-filter (aka "for-each-ref") placeholders, where we have support
to a lot more flexible way to customize these things.

For example, "%(authoremail:mailmap,localpart)" can be used to say,
instead of wasting two letters 'l' and 'L' out of precious 52, that
we want e-mail address honoring the mailmap, and take only the local
part.  And the support for the host part of the address that this
topic discussed should be implementable fairly easily (just adding
EO_HOSTPART bit to the email_option structure would be sufficient)
on the ref-filter side.

We saw efforts from time to time to give "log --pretty=format:" more
of the good things from the "for-each-ref --format=" placeholders
(and vice versa), and it may give us a good way forward.


  reply	other threads:[~2023-11-20 20:21 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 [this message]
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

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=xmqqwmucjhuw.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=five231003@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=liambeguin@gmail.com \
    --cc=peff@peff.net \
    /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).