Skip to contentSkip to conversation

scripts: helper for mailing patches from git to the maintainers

PATCH In review Enrico Weigelt, metux IT consult 2 participants 2 messages Jun 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: helper for mailing patches from git to the maintainers

This is a little helper script for mailing patches out of a git branch to the corresponding maintainers.

Essentially, it scans the touched files, asks get_maintainer.pl for their maintainers and calls git-send-email for mailing out the patches.

Syntax:

./scripts/git-send-patch <ref> [<optional git-send-email args>]

Examples:

  ./scripts/git-send-patch HEAD^
  ./scripts/git-send-patch linus/master --dry-run
---
 MAINTAINERS            |  5 ++++
 scripts/git-send-patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100755 scripts/git-send-patch
MAINTAINERS +5 -0
index d0ed735..b075c4b 100644
@@ -6694,6 +6694,11 @@ F:	Documentation/isdn/README.gigaset
 F:	drivers/isdn/gigaset/
 F:	include/uapi/linux/gigaset_dev.h
 
+GIT_SEND_PATCH SCRIPT
+M:	Enrico Weigelt, metux IT consult <[email protected]>
+F:	scripts/git-send-patch
+S:	Maintained
+
 GNSS SUBSYSTEM
 M:	Johan Hovold <[email protected]>
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git
scripts/git-send-patch new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw
Quoted 6 lines · metux IT consult

This is a little helper script for mailing patches out of a git branch to the corresponding maintainers.

Essentially, it scans the touched files, asks get_maintainer.pl for their maintainers and calls git-send-email for mailing out the patches.

[]

scripts/git-send-patch line 37

Quoted 2 lines
scripts/git-send-patch new file +2 -0
+get_maintainers() {
+    $KERNELSRC/scripts/get_maintainer.pl --m --l --remove-duplicates `get_files` |

--noroles --norolestats

It's also useful to separate the --to and --cc lines where the --to goes only to direct maintainers and --cc goes to others.

Quoted 3 lines
scripts/git-send-patch new file +3 -0
+        grep -v "$LKML" | \
+        grep -E "(maintainer|reviewer|open list)" | \
+        grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*'