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

David Marchand david.marchand at redhat.com
Tue Apr 12 11:12:07 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>
---
Changes since v1:
- factorize matching with a regexp,

---
 tools/filter-patch-email.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/filter-patch-email.sh b/tools/filter-patch-email.sh
index 9ac8221..6593403 100755
--- a/tools/filter-patch-email.sh
+++ b/tools/filter-patch-email.sh
@@ -43,11 +43,11 @@ 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 '^\[PATCH' ; then
+					if echo "$subject" | grep -qE '^\[(RFC |)PATCH' ; then
 						patchsubject=true
 						break
 					fi
-- 
2.23.0



More information about the ci mailing list