From: Liam Beguin <liambeguin@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Kousik Sanagavarapu <five231003@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 2/2] pretty: add '%aA' to show domain-part of email addresses
Date: Fri, 27 Oct 2023 23:22:21 -0400 [thread overview]
Message-ID: <20231028032221.GB1784118@shaak> (raw)
In-Reply-To: <20231028021301.GA35796@coredump.intra.peff.net>
Hi Junio, Peff,
On Fri, Oct 27, 2023 at 10:13:01PM -0400, Jeff King wrote:
> On Sat, Oct 28, 2023 at 09:12:06AM +0900, Junio C Hamano wrote:
>
> > Grouping @gmail.com addresses do not smell all that useful, though.
While I agree with you, I think that's more an exception that the rule.
> > More importantly, it is not clear what "Many reports" refers to. If
> > they are *not* verbatim output from "git log" family of commands,
> > iow, they are produced by post-processing output from "git log"
> > family of commands, then I do not quite see why %aa is useful at
> > all.
I might've been a bit generous with "many report", I was mostly thinking
of the ones published by lwn.net, and U-Boot for example.
To some extent, "git shortlog" could be considered a part of that
post-processing chain.
> One way you could directly use this is in shortlog, which these days
> lets you group by specific formats. So:
>
> git shortlog -ns --group=format:%aA
That's exactly what I implemented this for :-)
> is potentially useful.
>
> I say "potentially" because it really depends on your project and its
> contributors. In git.git the results are mostly either too broad
> ("gmail.com" covers many unrelated people) or too narrow (I'll assume
> I'm the only contributor from "peff.net"). There are a few possibly
> useful ones ("microsoft.com", "gitlab.com", though even those are
> misleading because email domains don't always correspond to
> affiliations).
I agree with your comment here, while grouping everything under
"gmail.com" for example doesn't provide anything really useful we can
rely on mailmap to fix that when appropriate. I think it would otherwise
count as unaffiliated.
I don't claim this to be foolproof, but I do think that it gives a good
overall view of which companies are involved in the project for the most
part.
> So I don't find it useful myself, but I see how it could be in the right
> circumstances. It also feels like a symmetric match to "%al", which
> already exists. I do find "aa" as the identifier a little hard to
> remember. I guess it's "a" for "address", though I'd have called the
> whole local@domain thing an address thing that. Of course "d" for domain
> would make sense, but that is already taken. If we could spell it as
> %(authoremail:domain) that would remove the question. But given the
> existence of "%al", I'm not too sad to see another letter allocated to
> this purpose in the meantime.
I chose the "a" for "address", but I'm not sold on %aa either.
I just couldn't find anything better that wasn't already taken.
What about "a@"?
It's a bit easier to remember, being the first character of the
domain-part.
> Just my two cents as a shortlog --format afficionado. ;) (Of course,
> shortlog itself is the ultimate "you could really just post-process log
> output" example).
I'm a big fan of shortlog --format (and --group) as well!
Taking it a step further, it's also possible to pass in whatever mailmap
you want to generate a "report". Let's say there's mapping that only
makes sense for a single release something like this could be used:
git -c mailmap.file=git-mailmap-v2.42 shortlog -sn --group=format:%aA
> -Peff
Thanks for your time.
Cheers,
Liam
next prev parent reply other threads:[~2023-10-28 3:22 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 [this message]
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
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=20231028032221.GB1784118@shaak \
--to=liambeguin@gmail.com \
--cc=five231003@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).