[PATCH] tools: accept patch with subject starting with RFC

David Marchand david.marchand at redhat.com
Tue Apr 12 10:54:17 CEST 2022


If a mail does not contain a X-Mailer: header, only a subject matching
[PATCH qualifies this mail as being a patch.
Extend this filter and accept [RFC PATCH too.

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 tools/filter-patch-email.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/filter-patch-email.sh b/tools/filter-patch-email.sh
index 9ac8221..5217df3 100755
--- a/tools/filter-patch-email.sh
+++ b/tools/filter-patch-email.sh
@@ -43,10 +43,14 @@ parse ()
 		set -- $line
 		if ! $content ; then
 			[ "$1" != 'X-Mailer:' -o "$2" != 'git-send-email' ] || gitsend=true
-			if echo "$line" | grep -qa '^Subject:.*\[PATCH' ; then
+			if echo "$line" | grep -qa '^Subject:.*PATCH' ; then
 				subject=$(echo "$line" | sed 's,^Subject:[[:space:]]*,,')
 				while [ -n "$subject" ] ; do
 					echo "$subject" | grep -q '^\[' || break
+					if echo "$subject" | grep -q '^\[RFC PATCH' ; then
+						patchsubject=true
+						break
+					fi
 					if echo "$subject" | grep -q '^\[PATCH' ; then
 						patchsubject=true
 						break
-- 
2.23.0



More information about the ci mailing list