* [PATCH 1/2] get_maintainer: look for configuration files in ./scripts [not found] <CGME20211116213417eucas1p2a9679f03f7945f7c2bdfcba7a4e7c405@eucas1p2.samsung.com> @ 2021-11-16 21:34 ` Łukasz Stelmach [not found] ` <CGME20211116213417eucas1p133783708f01c8cf82bd341a4cf95a833@eucas1p1.samsung.com> ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Łukasz Stelmach @ 2021-11-16 21:34 UTC (permalink / raw) To: Joe Perches, Andrew Morton Cc: Marek Szyprowski, Łukasz Stelmach, linux-kernel Change ".scripts" to "./scripts" as described in commit bcde44ed7d2a ("scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME then scripts"). Enumerate paths to search directly in an array instead of joining and splitting. Fixes: bcde44ed7d2a ("scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME then scripts"). Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 2075db0c08b8..ff10c2878522 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -1478,7 +1478,7 @@ sub which { sub which_conf { my ($conf) = @_; - foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) { + foreach my $path (".", "$ENV{HOME}", "./scripts") { if (-e "$path/$conf") { return "$path/$conf"; } -- 2.30.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
[parent not found: <CGME20211116213417eucas1p133783708f01c8cf82bd341a4cf95a833@eucas1p1.samsung.com>]
* [PATCH 2/2] get_maintainer: ignore "my" e-mail address [not found] ` <CGME20211116213417eucas1p133783708f01c8cf82bd341a4cf95a833@eucas1p1.samsung.com> @ 2021-11-16 21:34 ` Łukasz Stelmach 2021-11-16 23:14 ` Joe Perches 0 siblings, 1 reply; 10+ messages in thread From: Łukasz Stelmach @ 2021-11-16 21:34 UTC (permalink / raw) To: Joe Perches; +Cc: Marek Szyprowski, Łukasz Stelmach, linux-kernel 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 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] get_maintainer: ignore "my" e-mail address 2021-11-16 21:34 ` [PATCH 2/2] get_maintainer: ignore "my" e-mail address Łukasz Stelmach @ 2021-11-16 23:14 ` Joe Perches [not found] ` <CGME20211125161420eucas1p2b3dbac252dab05d0a5406d0fca8ab945@eucas1p2.samsung.com> 0 siblings, 1 reply; 10+ messages in thread From: Joe Perches @ 2021-11-16 23:14 UTC (permalink / raw) To: Łukasz Stelmach; +Cc: Marek Szyprowski, linux-kernel On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: > Ignore one's own e-mail address given as a parameter to --ignore-me > or in the EMAIL environment variable. Why is this useful? git send-email already supports this. --suppress-cc=<category> Specify an additional category of recipients to suppress the auto-cc of: • author will avoid including the patch author • self will avoid including the sender --[no-]suppress-from If this is set, do not add the From: address to the cc: list. Default is the value of sendemail.suppressFrom configuration value; if that is unspecified, default to --no-suppress-from. ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CGME20211125161420eucas1p2b3dbac252dab05d0a5406d0fca8ab945@eucas1p2.samsung.com>]
* Re: [PATCH 2/2] get_maintainer: ignore "my" e-mail address [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 0 siblings, 2 replies; 10+ messages in thread From: Lukasz Stelmach @ 2021-11-25 16:14 UTC (permalink / raw) To: Joe Perches; +Cc: Marek Szyprowski, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1550 bytes --] It was <2021-11-16 wto 15:14>, when Joe Perches wrote: > On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: >> Ignore one's own e-mail address given as a parameter to --ignore-me >> or in the EMAIL environment variable. > > Why is this useful? > > git send-email already supports this. > > --suppress-cc=<category> > Specify an additional category of recipients to suppress > the auto-cc of: > > • author will avoid including the patch author > > • self will avoid including the sender > > --[no-]suppress-from > If this is set, do not add the From: address to the cc: > list. Default is the value of sendemail.suppressFrom > configuration value; if that is unspecified, default to > --no-suppress-from. > Not really, git send-email does not support --suppress-to, and with get_maintainers.pl coupled with git send-email as follows --8<---------------cut here---------------start------------->8--- [sendemail] tocmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol --" cccmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom --nor --nofixes --" --8<---------------cut here---------------end--------------->8--- my address is added to To: if I am a maintainer of the patched files. To avoid this the --ignore-me options can be added to tocmd. -- Łukasz Stelmach Samsung R&D Institute Poland Samsung Electronics [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] get_maintainer: ignore "my" e-mail address 2021-11-25 16:14 ` Lukasz Stelmach @ 2021-11-25 16:33 ` Joe Perches 2021-11-25 17:01 ` Joe Perches 1 sibling, 0 replies; 10+ messages in thread From: Joe Perches @ 2021-11-25 16:33 UTC (permalink / raw) To: Lukasz Stelmach; +Cc: Marek Szyprowski, linux-kernel On Thu, 2021-11-25 at 17:14 +0100, Lukasz Stelmach wrote: > It was <2021-11-16 wto 15:14>, when Joe Perches wrote: > > On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: > > > Ignore one's own e-mail address given as a parameter to --ignore-me > > > or in the EMAIL environment variable. > > > > Why is this useful? > > > > git send-email already supports this. > > > > --suppress-cc=<category> > > Specify an additional category of recipients to suppress > > the auto-cc of: > > > > • author will avoid including the patch author > > > > • self will avoid including the sender > > > > --[no-]suppress-from > > If this is set, do not add the From: address to the cc: > > list. Default is the value of sendemail.suppressFrom > > configuration value; if that is unspecified, default to > > --no-suppress-from. > > > > Not really, git send-email does not support --suppress-to, and with > get_maintainers.pl coupled with git send-email as follows > > --8<---------------cut here---------------start------------->8--- > [sendemail] > tocmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol --" > cccmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom --nor --nofixes --" > --8<---------------cut here---------------end--------------->8--- > > my address is added to To: if I am a maintainer of the patched files. > To avoid this the --ignore-me options can be added to tocmd. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] get_maintainer: ignore "my" e-mail address 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> 1 sibling, 1 reply; 10+ messages in thread From: Joe Perches @ 2021-11-25 17:01 UTC (permalink / raw) To: Lukasz Stelmach; +Cc: Marek Szyprowski, linux-kernel (I dislike my email client sometimes, apologies for the blank reply) On Thu, 2021-11-25 at 17:14 +0100, Lukasz Stelmach wrote: > It was <2021-11-16 wto 15:14>, when Joe Perches wrote: > > On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: > > > Ignore one's own e-mail address given as a parameter to --ignore-me > > > or in the EMAIL environment variable. > > > > Why is this useful? > > > > git send-email already supports this. > > > > --suppress-cc=<category> > > Specify an additional category of recipients to suppress > > the auto-cc of: > > > > • author will avoid including the patch author > > > > • self will avoid including the sender > > > > --[no-]suppress-from > > If this is set, do not add the From: address to the cc: > > list. Default is the value of sendemail.suppressFrom > > configuration value; if that is unspecified, default to > > --no-suppress-from. > > > > Not really, git send-email does not support --suppress-to, and with > get_maintainers.pl coupled with git send-email as follows > > --8<---------------cut here---------------start------------->8--- > [sendemail] > tocmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol --" > cccmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom --nor --nofixes --" > --8<---------------cut here---------------end--------------->8--- > > my address is added to To: if I am a maintainer of the patched files. > To avoid this the --ignore-me options can be added to tocmd. Rather than add complexity to the original get_maintainer script, is it possible to add a pipe like " | grep -v '<your_address>'" to tocmd ? I think it better to have these cmds use scripts ala: https://lore.kernel.org/all/1473862411.32273.25.camel@perches.com/ And if not a script and the complexity is warranted (though I think not) I'd rather have something like --suppress-addresss "<addr>" added to get_maintainer.pl to allow one or more addresses to be suppressed. ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CGME20211129214755eucas1p1c5ded52cda8d495d23dae59a871b9276@eucas1p1.samsung.com>]
* Re: [PATCH 2/2] get_maintainer: ignore "my" e-mail address [not found] ` <CGME20211129214755eucas1p1c5ded52cda8d495d23dae59a871b9276@eucas1p1.samsung.com> @ 2021-11-29 21:47 ` Lukasz Stelmach 0 siblings, 0 replies; 10+ messages in thread From: Lukasz Stelmach @ 2021-11-29 21:47 UTC (permalink / raw) To: Joe Perches; +Cc: Marek Szyprowski, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2422 bytes --] It was <2021-11-25 czw 09:01>, when Joe Perches wrote: > On Thu, 2021-11-25 at 17:14 +0100, Lukasz Stelmach wrote: >> It was <2021-11-16 wto 15:14>, when Joe Perches wrote: >> > On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: >> > > Ignore one's own e-mail address given as a parameter to --ignore-me >> > > or in the EMAIL environment variable. >> > >> > Why is this useful? >> > >> > git send-email already supports this. >> > >> > --suppress-cc=<category> >> > Specify an additional category of recipients to suppress >> > the auto-cc of: >> > >> > • author will avoid including the patch author >> > >> > • self will avoid including the sender >> > >> > --[no-]suppress-from >> > If this is set, do not add the From: address to the cc: >> > list. Default is the value of sendemail.suppressFrom >> > configuration value; if that is unspecified, default to >> > --no-suppress-from. >> > >> >> Not really, git send-email does not support --suppress-to, and with >> get_maintainers.pl coupled with git send-email as follows >> >> --8<---------------cut here---------------start------------->8--- >> [sendemail] >> tocmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol --" >> cccmd = "`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom --nor --nofixes --" >> --8<---------------cut here---------------end--------------->8--- >> >> my address is added to To: if I am a maintainer of the patched files. >> To avoid this the --ignore-me options can be added to tocmd. > > Rather than add complexity to the original get_maintainer script, is > it possible to add a pipe like " | grep -v '<your_address>'" to tocmd ? > > I think it better to have these cmds use scripts ala: > > https://lore.kernel.org/all/1473862411.32273.25.camel@perches.com/ A thin wrapper is never a bad thing (-; > And if not a script and the complexity is warranted (though I think not) > I'd rather have something like --suppress-addresss "<addr>" added to > get_maintainer.pl to allow one or more addresses to be suppressed. Indeed, that sound a lot more reasonable. I'll probably go with wrappers for now. Thanks. -- Łukasz Stelmach Samsung R&D Institute Poland Samsung Electronics [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] get_maintainer: look for configuration files in ./scripts 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:56 ` Andrew Morton 2021-11-16 23:10 ` Joe Perches 2 siblings, 0 replies; 10+ messages in thread From: Andrew Morton @ 2021-11-16 21:56 UTC (permalink / raw) To: Łukasz Stelmach; +Cc: Joe Perches, Marek Szyprowski, linux-kernel On Tue, 16 Nov 2021 22:34:01 +0100 Łukasz Stelmach <l.stelmach@samsung.com> wrote: > Change ".scripts" to "./scripts" as described in commit bcde44ed7d2a > ("scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME > then scripts"). Won't this break people who are using ".scripts"? If so, we should either leave it as-is and update the documentation (which doesn't appear to exist) or to newly add ./scripts and leave .scripts unaltered. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] get_maintainer: look for configuration files in ./scripts 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: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> 2 siblings, 1 reply; 10+ messages in thread From: Joe Perches @ 2021-11-16 23:10 UTC (permalink / raw) To: Łukasz Stelmach, Andrew Morton; +Cc: Marek Szyprowski, linux-kernel On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: > Change ".scripts" to "./scripts" as described in commit bcde44ed7d2a > ("scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME > then scripts"). The intent there was to use the <kernel_tree>/scripts directory Adding . to that would change that. ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CGME20211117120811eucas1p1cdc0aa3ab93d11cebf85592d4e98f0c7@eucas1p1.samsung.com>]
* Re: [PATCH 1/2] get_maintainer: look for configuration files in ./scripts [not found] ` <CGME20211117120811eucas1p1cdc0aa3ab93d11cebf85592d4e98f0c7@eucas1p1.samsung.com> @ 2021-11-17 12:07 ` Lukasz Stelmach 0 siblings, 0 replies; 10+ messages in thread From: Lukasz Stelmach @ 2021-11-17 12:07 UTC (permalink / raw) To: Joe Perches, Andrew Morton; +Cc: Marek Szyprowski, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1450 bytes --] It was <2021-11-16 wto 15:10>, when Joe Perches wrote: > On Tue, 2021-11-16 at 22:34 +0100, Łukasz Stelmach wrote: >> Change ".scripts" to "./scripts" as described in commit bcde44ed7d2a >> ("scripts/get_maintainer.pl: use .get_maintainer.conf from . then $HOME >> then scripts"). > > The intent there was to use the <kernel_tree>/scripts directory I am afraid bcde44ed7d2a[1] removed references to ${lk_path} and made git_maintainer.pl look for the files in the directory the script is invoked from. > Adding . to that would change that. Andrew points out[2] that some we might need to include .scripts too. Where do we expect the config files to be (do comment)? . - current directory (?) ${lk_path}/ - the top directory of source tree ${HOME}/ - per-user ${lk_path}/scripts - how is this dfferent from ${lk_path}? ${lk_path}/.scripts - Andrew says someone might have started using it I'd also add in this commit or another ${XDG_CONFIG_HOME}/get_maintainers. However, I think files in this directory should be named conf and ignore instead of .get_maintainer.conf and get_maintainer.ignore (respectively). [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bcde44ed7d2a [2] https://lore.kernel.org/lkml/20211116135627.321aa8ef46ee389cf66692df@linux-foundation.org/ -- Łukasz Stelmach Samsung R&D Institute Poland Samsung Electronics [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-11-29 21:50 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [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 ` [PATCH 2/2] get_maintainer: ignore "my" e-mail address Łukasz Stelmach 2021-11-16 23:14 ` 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
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).