git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] pretty: add '%aA' to show domain-part of email addresses

From
Liam Beguin <liambeguin@gmail.com>
Date
Dec 10, 2023, 21:07 UTC
Message-ID
<20231210210720.GB3139350@shaak>
In-Reply-To
<xmqqwmucjhuw.fsf@gitster.g>
Hi Junio,
Apologies for the late reply.
On Tue, Nov 21, 2023 at 05:21:43AM +0900, Junio C Hamano wrote:
Show 19 quoted lines
> 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.

I looked into this a little, after your first email. I'll try to make time to have another look.

Show 11 quoted lines
> 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.

This definitely sounds like a better approach than wasting two more letters.

Liam
Previous: Junio C HamanoNext: Liam Beguin
Message 14 of 21 in “pretty: add %aA to show domain-part of email addresses”
  1. 0/2 pretty: add %aA to show domain-part of email addressesLiam Beguin, Oct 26, 2023
  2. 1/2 doc: pretty-formats: add missing wordLiam Beguin, Oct 26, 2023
  3. 2/2 pretty: add '%aA' to show domain-part of email addressesLiam Beguin, Oct 26, 2023
  4. Kousik SanagavarapuOct 27, 2023
  5. Junio C HamanoOct 28, 2023
  6. Jeff KingOct 28, 2023
  7. Liam BeguinOct 28, 2023
  8. Andy KoppeOct 28, 2023
  9. Andy KoppeOct 28, 2023
  10. Jeff KingOct 30, 2023
  11. Liam BeguinNov 1, 2023
  12. Junio C HamanoOct 29, 2023
  13. Junio C HamanoNov 20, 2023
  14. Liam BeguinDec 10, 2023
  15. Liam BeguinOct 28, 2023
  16. Oswald BuddenhagenOct 28, 2023
  17. Andy KoppeOct 28, 2023
  18. Andy KoppeNov 3, 2023
  19. Kousik SanagavarapuNov 3, 2023
  20. Junio C HamanoNov 4, 2023
  21. Andy KoppeNov 4, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.