[PATCH v2 1/1] scripts: Add add-maintainer.py

Nicolas Schier nicolas at fjasle.eu
Fri Aug 25 04:44:57 PDT 2023


On Thu 24 Aug 2023 14:44:36 GMT, Guru Das Srinagesh wrote:
[...]
> > > The script is quiet by default (only prints errors) and its verbosity
> > > can be adjusted via an optional parameter.
> > 
> > IMO, it would be nice to see which addresses are effectively added, e.g.
> > comparable to the output of git send-email.  Perhaps somehing like:
> > 
> >   $ scripts/add-maintainer.py *.patch
> >   0001-fixup-scripts-Add-add-maintainer.py.patch: Adding 'To: Guru Das Srinagesh <quic_gurus at quicinc.com>' (maintainer)
> >   0001-fixup-scripts-Add-add-maintainer.py.patch: Adding 'Cc: linux-kernel at vger.kernel.org' (list)
> > 
> > Perhaps verbosity should then be configurable.
> 
> Yes, this is already implemented - you just need to pass "--verbosity debug" to
> the script. Example based on commit 8648aeb5d7b7 ("power: supply: add Qualcomm
> PMI8998 SMB2 Charger driver") converted to a patch:
> 
>     $ ./scripts/add-maintainer.py --verbosity debug $u/upstream/patches/test2/0001-power-supply-add-Qualcomm-PMI8998-SMB2-Charger-drive.patch
>     INFO: GET: Patch: 0001-power-supply-add-Qualcomm-PMI8998-SMB2-Charger-drive.patch
>     DEBUG:
>     Sebastian Reichel <sre at kernel.org> (maintainer:POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS)
>     Andy Gross <agross at kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
>     Bjorn Andersson <andersson at kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
>     Konrad Dybcio <konrad.dybcio at linaro.org> (maintainer:ARM/QUALCOMM SUPPORT)
>     Nathan Chancellor <nathan at kernel.org> (supporter:CLANG/LLVM BUILD SUPPORT)
>     Nick Desaulniers <ndesaulniers at google.com> (supporter:CLANG/LLVM BUILD SUPPORT)
>     Tom Rix <trix at redhat.com> (reviewer:CLANG/LLVM BUILD SUPPORT)
>     linux-kernel at vger.kernel.org (open list)
>     linux-pm at vger.kernel.org (open list:POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS)
>     linux-arm-msm at vger.kernel.org (open list:ARM/QUALCOMM SUPPORT)
>     llvm at lists.linux.dev (open list:CLANG/LLVM BUILD SUPPORT)
>     
>     INFO: ADD: Patch: 0001-power-supply-add-Qualcomm-PMI8998-SMB2-Charger-drive.patch
>     DEBUG: Cc Lists:
>     Cc: linux-arm-msm at vger.kernel.org
>     Cc: llvm at lists.linux.dev
>     Cc: linux-pm at vger.kernel.org
>     Cc: linux-kernel at vger.kernel.org
>     DEBUG: Cc Others:
>     Cc: Tom Rix <trix at redhat.com>
>     Cc: Nick Desaulniers <ndesaulniers at google.com>
>     Cc: Nathan Chancellor <nathan at kernel.org>
>     DEBUG: Cc Maintainers:
>     None
>     DEBUG: To Maintainers:
>     To: Sebastian Reichel <sre at kernel.org>
>     To: Andy Gross <agross at kernel.org>
>     To: Bjorn Andersson <andersson at kernel.org>
>     To: Konrad Dybcio <konrad.dybcio at linaro.org>
>     
>     INFO: Maintainers added to all patch files successfully
> 
> The first "GET:" output prints the output of `get_maintainer.pl` verbatim, and
> the "ADD:" output shows what exactly is getting added to that patch. Hope this
> is what you were expecting. Please let me know if you'd prefer any other
> modifications to this debug output.

ups.  I tested with --verbosity=info but not with =debug, therefore I 
missed it.  Sorry for the noise.


[...]
> > While testing, I thought that adding addresses without filtering-out duplicates
> > was odd; but as git-send-email does the unique filtering, it doesn't matter.
> 
> Since I'm using `set()` in this script, the uniqueness is guaranteed here as
> well - there won't be any duplicates.

I thought about patch files that already have 'To/Cc' headers (e.g.  
'git format-patch --to=... --cc=...' or by running add-maintainer.py 
multiple times for updating the lists of recipients.  The result is a 
patch file with possible duplicated lines; but as written: it does 
matter, effectively.

Kind regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230825/027fe057/attachment.sig>


More information about the linux-arm-kernel mailing list