* [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email
@ 2018-10-08 7:43 Peter Korsgaard
2018-10-08 7:46 ` Thomas Petazzoni
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-10-08 7:43 UTC (permalink / raw)
To: buildroot
When called with a list of patches, get-developers prints the entire git
send-email invocation line:
./utils/get-developers 0001-git-security-bump-to-version-2.16.5.patch
git send-email --to buildroot at buildroot.org --cc "Matt Weber <matthew.weber@rockwellcollins.com>"
This may be handy when creating an entire patch series and editing a cover
letter, but it does mean that this has to be explicitly executed and
get-developers cannot be used directly by the --cc-cmd option of git
send-email to automatically CC affected developers.
So add an -e flag to only let get-developers print the email addresses of
the affected developers in the one-email-per-line format expected by git
send-email, similar to how get_maintainer.pl works in the Linux kernel.
With this and a suitable git configuration:
git config sendemail.to buildroot at buildroot.org
git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
You can simply do:
git send-email master
To automatically mail the buildroot list and CC affected developers on
patches.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
utils/get-developers | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/utils/get-developers b/utils/get-developers
index f525ff2226..9135b41662 100755
--- a/utils/get-developers
+++ b/utils/get-developers
@@ -18,6 +18,8 @@ def parse_args():
help='find developers in charge of these files')
parser.add_argument('-c', dest='check', action='store_const',
const=True, help='list files not handled by any developer')
+ parser.add_argument('-e', dest='email', action='store_const',
+ const=True, help='only list affected developer email addresses')
return parser.parse_args()
@@ -90,12 +92,16 @@ def __main__():
if i in dev.infras:
matching_devs.add(dev.name)
- result = "--to buildroot at buildroot.org"
- for dev in matching_devs:
- result += " --cc \"%s\"" % dev
+ if args.email:
+ for dev in matching_devs:
+ print dev
+ else:
+ result = "--to buildroot at buildroot.org"
+ for dev in matching_devs:
+ result += " --cc \"%s\"" % dev
- if result != "":
- print("git send-email %s" % result)
+ if result != "":
+ print("git send-email %s" % result)
__main__()
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email
2018-10-08 7:43 [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email Peter Korsgaard
@ 2018-10-08 7:46 ` Thomas Petazzoni
2018-10-08 15:47 ` Thomas Petazzoni
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-08 7:46 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 8 Oct 2018 09:43:33 +0200, Peter Korsgaard wrote:
> When called with a list of patches, get-developers prints the entire git
> send-email invocation line:
>
> ./utils/get-developers 0001-git-security-bump-to-version-2.16.5.patch
> git send-email --to buildroot at buildroot.org --cc "Matt Weber <matthew.weber@rockwellcollins.com>"
>
> This may be handy when creating an entire patch series and editing a cover
> letter, but it does mean that this has to be explicitly executed and
> get-developers cannot be used directly by the --cc-cmd option of git
> send-email to automatically CC affected developers.
>
> So add an -e flag to only let get-developers print the email addresses of
> the affected developers in the one-email-per-line format expected by git
> send-email, similar to how get_maintainer.pl works in the Linux kernel.
>
> With this and a suitable git configuration:
>
> git config sendemail.to buildroot at buildroot.org
> git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
>
> You can simply do:
>
> git send-email master
>
> To automatically mail the buildroot list and CC affected developers on
> patches.
>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email
2018-10-08 7:43 [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email Peter Korsgaard
2018-10-08 7:46 ` Thomas Petazzoni
@ 2018-10-08 15:47 ` Thomas Petazzoni
2018-10-08 16:11 ` Arnout Vandecappelle
2018-10-21 12:46 ` Peter Korsgaard
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-08 15:47 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 8 Oct 2018 09:43:33 +0200, Peter Korsgaard wrote:
> When called with a list of patches, get-developers prints the entire git
> send-email invocation line:
>
> ./utils/get-developers 0001-git-security-bump-to-version-2.16.5.patch
> git send-email --to buildroot at buildroot.org --cc "Matt Weber <matthew.weber@rockwellcollins.com>"
>
> This may be handy when creating an entire patch series and editing a cover
> letter, but it does mean that this has to be explicitly executed and
> get-developers cannot be used directly by the --cc-cmd option of git
> send-email to automatically CC affected developers.
>
> So add an -e flag to only let get-developers print the email addresses of
> the affected developers in the one-email-per-line format expected by git
> send-email, similar to how get_maintainer.pl works in the Linux kernel.
>
> With this and a suitable git configuration:
>
> git config sendemail.to buildroot at buildroot.org
> git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
>
> You can simply do:
>
> git send-email master
>
> To automatically mail the buildroot list and CC affected developers on
> patches.
>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> utils/get-developers | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email
2018-10-08 7:43 [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email Peter Korsgaard
2018-10-08 7:46 ` Thomas Petazzoni
2018-10-08 15:47 ` Thomas Petazzoni
@ 2018-10-08 16:11 ` Arnout Vandecappelle
2018-10-09 8:29 ` Peter Korsgaard
2018-10-21 12:46 ` Peter Korsgaard
3 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2018-10-08 16:11 UTC (permalink / raw)
To: buildroot
Hi Peter,
On 8/10/18 09:43, Peter Korsgaard wrote:
[snip]
> With this and a suitable git configuration:
>
> git config sendemail.to buildroot at buildroot.org
> git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
>
> You can simply do:
>
> git send-email master
>
> To automatically mail the buildroot list and CC affected developers on
> patches.
Could you add this fragment to docs/manual/contribute.txt as well?
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email
2018-10-08 16:11 ` Arnout Vandecappelle
@ 2018-10-09 8:29 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-10-09 8:29 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
>> To automatically mail the buildroot list and CC affected developers on
>> patches.
> Could you add this fragment to docs/manual/contribute.txt as well?
Sure:
https://patchwork.ozlabs.org/patch/981092/
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email
2018-10-08 7:43 [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email Peter Korsgaard
` (2 preceding siblings ...)
2018-10-08 16:11 ` Arnout Vandecappelle
@ 2018-10-21 12:46 ` Peter Korsgaard
3 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-10-21 12:46 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> When called with a list of patches, get-developers prints the entire git
> send-email invocation line:
> ./utils/get-developers 0001-git-security-bump-to-version-2.16.5.patch
> git send-email --to buildroot at buildroot.org --cc "Matt Weber <matthew.weber@rockwellcollins.com>"
> This may be handy when creating an entire patch series and editing a cover
> letter, but it does mean that this has to be explicitly executed and
> get-developers cannot be used directly by the --cc-cmd option of git
> send-email to automatically CC affected developers.
> So add an -e flag to only let get-developers print the email addresses of
> the affected developers in the one-email-per-line format expected by git
> send-email, similar to how get_maintainer.pl works in the Linux kernel.
> With this and a suitable git configuration:
> git config sendemail.to buildroot at buildroot.org
> git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"
> You can simply do:
> git send-email master
> To automatically mail the buildroot list and CC affected developers on
> patches.
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed to 2018.02.x and 2018.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-21 12:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 7:43 [Buildroot] [PATCH] utils/get-developers: add -e flag to only list email addresses for git send-email Peter Korsgaard
2018-10-08 7:46 ` Thomas Petazzoni
2018-10-08 15:47 ` Thomas Petazzoni
2018-10-08 16:11 ` Arnout Vandecappelle
2018-10-09 8:29 ` Peter Korsgaard
2018-10-21 12:46 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox