git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Matthias Aßhauer" <mha1993@live.de>
Cc: Linus Arver via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Jonathan Tan <jonathantanmy@google.com>,
	 Emily Shaffer <nasamuffin@google.com>,
	 Matthieu MOY <matthieu.moy@univ-lyon1.fr>,
	Linus Arver <linusa@google.com>
Subject: Re: [RFC] git-contacts: exclude list
Date: Wed, 03 Apr 2024 09:39:20 -0700	[thread overview]
Message-ID: <xmqqsf028kp3.fsf@gitster.g> (raw)
In-Reply-To: <DB9P250MB06923CE0F60A117A5CA5B028A53D2@DB9P250MB0692.EURP250.PROD.OUTLOOK.COM> ("Matthias Aßhauer"'s message of "Wed, 3 Apr 2024 12:11:47 +0200 (CEST)")

Matthias Aßhauer <mha1993@live.de> writes:

> Would it make sense to have a way to teach `git-contacts` to exclude a
> user defined list of known-bad recipient adresses? This could
> potentiallly be an extension of mailmap or a separate file.

The contacts script already uses "check-mailmap".  

Unfortunately it only uses the default mailmap, which may not be
suitable for our purpose here, but it shouldn't be too hard to run
"git -c mailmap.file=<custom> check-mailmap", ship a custom mailmap
file with the contacts script to map defunct addresses to something
that is clearly invalid, and then filter them out from the output.

We want to add a mechanism to allow "including" another mailmap, so
that "../../.mailmap" is included from contrib/contacts/mailmap or
something like that.

On the other hand, if we want to use our primary mailmap to also
mark the defunct addresses, then we do not have to do anything
special.  Mark these defunct addresses to the primary mailmap to
map them to "$HumanReadableName <$name@defunct.invalid>" and then
doing something like the attached.

diff --git i/contrib/contacts/git-contacts w/contrib/contacts/git-contacts
index 85ad732fc0..00e77c4125 100755
--- i/contrib/contacts/git-contacts
+++ w/contrib/contacts/git-contacts
@@ -197,6 +197,7 @@ $contacts = mailmap_contacts($contacts);
 
 my $ncommits = scalar(keys %commits);
 for my $contact (keys %$contacts) {
+	next if $contact =~ /\@defunct.invalid>$/;
 	my $percent = $contacts->{$contact} * 100 / $ncommits;
 	next if $percent < $min_percent;
 	print "$contact\n";


  reply	other threads:[~2024-04-03 16:39 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  0:20 [PATCH] docs: recommend using contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-02  6:28 ` Patrick Steinhardt
2024-04-04 20:00   ` Linus Arver
2024-04-03  8:42 ` Matthias Aßhauer
2024-04-03 16:13   ` Junio C Hamano
2024-04-04 20:01   ` Linus Arver
     [not found] ` <35192e61-c442-6719-caf0-1019bf3e44c9@live.de>
2024-04-03 10:11   ` [RFC] git-contacts: exclude list (was: Re: [PATCH] docs: recommend using contrib/contacts/git-contacts) Matthias Aßhauer
2024-04-03 16:39     ` Junio C Hamano [this message]
     [not found]   ` <ac044ecd116d4491b5f6cdddc0266486@SAMBXP02.univ-lyon1.fr>
2024-04-03 12:13     ` [RFC] git-contacts: exclude list Matthieu Moy
2024-04-06  1:22 ` [PATCH v2 0/8] docs: recommend using contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-06  1:22   ` [PATCH v2 1/8] MyFirstContribution: mention contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-06  2:22     ` Junio C Hamano
2024-04-09  1:08       ` Linus Arver
2024-04-09  1:49         ` Junio C Hamano
2024-04-06  1:22   ` [PATCH v2 2/8] SubmittingPatches: make 'git contacts' grep-friendly Linus Arver via GitGitGadget
2024-04-06  2:23     ` Junio C Hamano
2024-04-06  1:22   ` [PATCH v2 3/8] SubmittingPatches: mention GitGitGadget Linus Arver via GitGitGadget
2024-04-06  2:26     ` Junio C Hamano
2024-04-09  1:10       ` Linus Arver
2024-04-09  1:49         ` Junio C Hamano
2024-04-06  1:22   ` [PATCH v2 4/8] SubmittingPatches: quote commands Linus Arver via GitGitGadget
2024-04-06  1:22   ` [PATCH v2 5/8] SubmittingPatches: discuss reviewers first Linus Arver via GitGitGadget
2024-04-06  1:22   ` [PATCH v2 6/8] SubmittingPatches: dedupe discussion of security patches Linus Arver via GitGitGadget
2024-04-06  1:22   ` [PATCH v2 7/8] SubmittingPatches: add heading for format-patch and send-email Linus Arver via GitGitGadget
2024-04-06  1:22   ` [PATCH v2 8/8] SubmittingPatches: demonstrate using git-contacts with git-send-email Linus Arver via GitGitGadget
2024-04-06  2:28   ` [PATCH v2 0/8] docs: recommend using contrib/contacts/git-contacts Junio C Hamano
2024-04-09 21:56   ` [PATCH v3 " Linus Arver via GitGitGadget
2024-04-09 21:56     ` [PATCH v3 1/8] MyFirstContribution: mention contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-09 22:20       ` Linus Arver
2024-04-09 23:02         ` Junio C Hamano
2024-04-09 23:42           ` Linus Arver
2024-04-11 22:53             ` Linus Arver
2024-04-09 21:56     ` [PATCH v3 2/8] SubmittingPatches: make 'git contacts' grep-friendly Linus Arver via GitGitGadget
2024-04-09 21:56     ` [PATCH v3 3/8] SubmittingPatches: mention GitGitGadget Linus Arver via GitGitGadget
2024-04-09 21:56     ` [PATCH v3 4/8] SubmittingPatches: quote commands Linus Arver via GitGitGadget
2024-04-09 21:56     ` [PATCH v3 5/8] SubmittingPatches: discuss reviewers first Linus Arver via GitGitGadget
2024-04-10  0:27       ` Eric Sunshine
2024-04-10  0:36         ` Junio C Hamano
2024-04-10  1:13         ` Linus Arver
2024-04-09 21:56     ` [PATCH v3 6/8] SubmittingPatches: dedupe discussion of security patches Linus Arver via GitGitGadget
2024-04-09 21:56     ` [PATCH v3 7/8] SubmittingPatches: add heading for format-patch and send-email Linus Arver via GitGitGadget
2024-04-09 21:56     ` [PATCH v3 8/8] SubmittingPatches: demonstrate using git-contacts with git-send-email Linus Arver via GitGitGadget
2024-04-11  0:19       ` Kipras Melnikovas
2024-04-11 21:03         ` Linus Arver
2024-04-12  8:48           ` Kipras Melnikovas
2024-04-11 23:32     ` [PATCH v4 0/8] docs: recommend using contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 1/8] MyFirstContribution: mention contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 2/8] SubmittingPatches: clarify 'git-contacts' location Linus Arver via GitGitGadget
2024-04-12 17:09         ` Junio C Hamano
2024-04-12 18:45           ` Eric Sunshine
2024-04-13  1:26             ` Junio C Hamano
2024-04-16 22:44           ` Linus Arver
2024-04-16 22:57             ` Junio C Hamano
2024-04-16 23:07               ` Linus Arver
2024-04-17  2:40                 ` Junio C Hamano
2024-04-17  5:38                   ` Junio C Hamano
2024-04-17  5:48                     ` Eric Sunshine
2024-04-17 14:47                       ` Junio C Hamano
2024-04-17 23:13                         ` Linus Arver
2024-04-17 23:08                     ` Linus Arver
2024-04-18 18:13                       ` Linus Arver
2024-04-11 23:32       ` [PATCH v4 3/8] SubmittingPatches: mention GitGitGadget Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 4/8] SubmittingPatches: quote commands Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 5/8] SubmittingPatches: discuss reviewers first Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 6/8] SubmittingPatches: dedupe discussion of security patches Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 7/8] SubmittingPatches: add heading for format-patch and send-email Linus Arver via GitGitGadget
2024-04-11 23:32       ` [PATCH v4 8/8] SubmittingPatches: demonstrate using git-contacts with git-send-email Linus Arver via GitGitGadget
2024-04-12 17:19         ` Junio C Hamano
2024-04-16  0:21           ` Linus Arver
2024-04-16 23:01       ` [PATCH v5 0/8] docs: recommend using contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 1/8] MyFirstContribution: mention contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 2/8] SubmittingPatches: clarify 'git-contacts' location Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 3/8] SubmittingPatches: mention GitGitGadget Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 4/8] SubmittingPatches: quote commands Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 5/8] SubmittingPatches: discuss reviewers first Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 6/8] SubmittingPatches: dedupe discussion of security patches Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 7/8] SubmittingPatches: add heading for format-patch and send-email Linus Arver via GitGitGadget
2024-04-16 23:01         ` [PATCH v5 8/8] SubmittingPatches: demonstrate using git-contacts with git-send-email Linus Arver via GitGitGadget
2024-04-18 21:51         ` [PATCH v6 0/8] docs: recommend using contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-18 21:51           ` [PATCH v6 1/8] MyFirstContribution: mention contrib/contacts/git-contacts Linus Arver via GitGitGadget
2024-04-18 21:51           ` [PATCH v6 2/8] SubmittingPatches: clarify 'git-contacts' location Linus Arver via GitGitGadget
2024-04-18 21:52           ` [PATCH v6 3/8] SubmittingPatches: mention GitGitGadget Linus Arver via GitGitGadget
2024-04-18 21:52           ` [PATCH v6 4/8] SubmittingPatches: quote commands Linus Arver via GitGitGadget
2024-04-18 21:52           ` [PATCH v6 5/8] SubmittingPatches: discuss reviewers first Linus Arver via GitGitGadget
2024-04-18 21:52           ` [PATCH v6 6/8] SubmittingPatches: dedupe discussion of security patches Linus Arver via GitGitGadget
2024-04-18 21:52           ` [PATCH v6 7/8] SubmittingPatches: add heading for format-patch and send-email Linus Arver via GitGitGadget
2024-04-18 21:52           ` [PATCH v6 8/8] SubmittingPatches: demonstrate using git-contacts with git-send-email Linus Arver via GitGitGadget
2024-04-18 21:56           ` [PATCH v6 0/8] docs: recommend using contrib/contacts/git-contacts Junio C Hamano

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=xmqqsf028kp3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jonathantanmy@google.com \
    --cc=linusa@google.com \
    --cc=matthieu.moy@univ-lyon1.fr \
    --cc=mha1993@live.de \
    --cc=nasamuffin@google.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).