utils/get-developers: add option to report Cc: lines
It is very common to use the output of get-developers to add cc: lines in the commit log. Add an option so that get-developers reports Cc: lines ready to be pasted in a commit log. That new option behaves similarly to the existing -e option: it only affects the output when parsing a patch. Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Cc: Julien Olivain <ju.o@free.fr> Signed-off-by: Julien Olivain <ju.o@free.fr> (cherry picked from commit 717f1fdaeb460c71f673a6ad6e82d16af878c188) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
7704fded71
commit
33ea45a4fb
@ -17,6 +17,8 @@ def __main__():
|
|||||||
help='find developers in charge of these files')
|
help='find developers in charge of these files')
|
||||||
parser.add_argument('-c', dest='check', action='store_const',
|
parser.add_argument('-c', dest='check', action='store_const',
|
||||||
const=True, help='list files not handled by any developer')
|
const=True, help='list files not handled by any developer')
|
||||||
|
parser.add_argument('--cc', action="store_true",
|
||||||
|
help='list affected developers as CC: lines ready to be pasted in a commit log')
|
||||||
parser.add_argument('-e', dest='email', action='store_const',
|
parser.add_argument('-e', dest='email', action='store_const',
|
||||||
const=True, help='only list affected developer email addresses')
|
const=True, help='only list affected developer email addresses')
|
||||||
parser.add_argument('-v', dest='validate', action='store_const',
|
parser.add_argument('-v', dest='validate', action='store_const',
|
||||||
@ -99,9 +101,9 @@ def __main__():
|
|||||||
matching_devs.add(dev.name)
|
matching_devs.add(dev.name)
|
||||||
|
|
||||||
matching_devs = sorted(matching_devs)
|
matching_devs = sorted(matching_devs)
|
||||||
if args.email:
|
if args.email or args.cc:
|
||||||
for dev in matching_devs:
|
for dev in matching_devs:
|
||||||
print(dev)
|
print(f"{'Cc: ' if args.cc else ''}{dev}")
|
||||||
else:
|
else:
|
||||||
result = "--to buildroot@buildroot.org"
|
result = "--to buildroot@buildroot.org"
|
||||||
for dev in matching_devs:
|
for dev in matching_devs:
|
||||||
|
Loading…
Reference in New Issue
Block a user