From: "Łukasz Stelmach" <l.stelmach@samsung.com>
To: Joe Perches <joe@perches.com>
Cc: "Marek Szyprowski" <m.szyprowski@samsung.com>,
"Łukasz Stelmach" <l.stelmach@samsung.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] get_maintainer: ignore "my" e-mail address
Date: Tue, 16 Nov 2021 22:34:02 +0100 [thread overview]
Message-ID: <20211116213403.820336-2-l.stelmach@samsung.com> (raw)
In-Reply-To: <20211116213403.820336-1-l.stelmach@samsung.com>
Ignore one's own e-mail address given as a parameter to --ignore-me
or in the EMAIL environment variable.
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
---
scripts/get_maintainer.pl | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ff10c2878522..0719d575c682 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -42,6 +42,7 @@ my $email_git_max_maintainers = 5;
my $email_git_min_percent = 5;
my $email_git_since = "1-year-ago";
my $email_hg_since = "-365";
+my $email_ignore_me = undef;
my $interactive = 0;
my $email_remove_duplicates = 1;
my $email_use_mailmap = 1;
@@ -251,6 +252,7 @@ if (!GetOptions(
'git-since=s' => \$email_git_since,
'hg-since=s' => \$email_hg_since,
'i|interactive!' => \$interactive,
+ 'ignore-me:s' => \$email_ignore_me,
'remove-duplicates!' => \$email_remove_duplicates,
'mailmap!' => \$email_use_mailmap,
'm!' => \$email_maintainer,
@@ -338,6 +340,17 @@ if ($tree && !top_of_kernel_tree($lk_path)) {
. "a linux kernel source tree.\n";
}
+if (defined $email_ignore_me) {
+ if ($email_ignore_me && rfc822_valid($email_ignore_me)) {
+ (undef, $email_ignore_me) = parse_email($email_ignore_me);
+ } elsif (!$email_ignore_me && defined $ENV{EMAIL} && rfc822_valid($ENV{EMAIL})) {
+ (undef, $email_ignore_me) = parse_email($ENV{EMAIL});
+ } else {
+ warn "$P: \"$email_ignore_me\" is not a valid e-mail address\n";
+ $email_ignore_me = 0;
+ }
+}
+
## Read MAINTAINERS for type/value pairs
my @typevalue = ();
@@ -1062,6 +1075,8 @@ MAINTAINER field selection options:
--rolestats => show roles and statistics (commits/total_commits, %)
--file-emails => add email addresses found in -f file (default: 0 (off))
--fixes => for patches, add signatures of commits with 'Fixes: <commit>' (default: 1 (on))
+ --ignore-me => ignore one's own e-mail address passed as a parameter or
+ via EMAIL environment variable
--scm => print SCM tree(s) if any
--status => print status if any
--subsystem => print subsystem name if any
@@ -1401,6 +1416,11 @@ sub push_email_address {
return 0;
}
+ if ($email_ignore_me) {
+ my ($myname, $myaddr) = parse_email($email_ignore_me);
+ return 0 if ($address eq $myaddr)
+ }
+
if (!$email_remove_duplicates) {
push(@email_to, [format_email($name, $address, $email_usename), $role]);
} elsif (!email_inuse($name, $address)) {
--
2.30.2
next prev parent reply other threads:[~2021-11-16 21:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20211116213417eucas1p2a9679f03f7945f7c2bdfcba7a4e7c405@eucas1p2.samsung.com>
2021-11-16 21:34 ` [PATCH 1/2] get_maintainer: look for configuration files in ./scripts Łukasz Stelmach
[not found] ` <CGME20211116213417eucas1p133783708f01c8cf82bd341a4cf95a833@eucas1p1.samsung.com>
2021-11-16 21:34 ` Łukasz Stelmach [this message]
2021-11-16 23:14 ` [PATCH 2/2] get_maintainer: ignore "my" e-mail address Joe Perches
[not found] ` <CGME20211125161420eucas1p2b3dbac252dab05d0a5406d0fca8ab945@eucas1p2.samsung.com>
2021-11-25 16:14 ` Lukasz Stelmach
2021-11-25 16:33 ` Joe Perches
2021-11-25 17:01 ` Joe Perches
[not found] ` <CGME20211129214755eucas1p1c5ded52cda8d495d23dae59a871b9276@eucas1p1.samsung.com>
2021-11-29 21:47 ` Lukasz Stelmach
2021-11-16 21:56 ` [PATCH 1/2] get_maintainer: look for configuration files in ./scripts Andrew Morton
2021-11-16 23:10 ` Joe Perches
[not found] ` <CGME20211117120811eucas1p1cdc0aa3ab93d11cebf85592d4e98f0c7@eucas1p1.samsung.com>
2021-11-17 12:07 ` Lukasz Stelmach
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=20211116213403.820336-2-l.stelmach@samsung.com \
--to=l.stelmach@samsung.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.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.
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).