[PATCH v2] tools: fix parsing message-id in the headers of email

Min Zhou zhoumin at loongson.cn
Thu Dec 14 03:47:14 CET 2023


Some email has the message-id header named "Message-id", like this:
https://patches.dpdk.org/project/dpdk/patch/20230930010024.34377-1-rdna@apple.com/.

This patch passes Message-[iI][dD] as the header argument to
getheader function.

Acked-by: Aaron Conole <aconole at redhat.com>
Signed-off-by: Min Zhou <zhoumin at loongson.cn>
---
 tools/parse-email.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/parse-email.sh b/tools/parse-email.sh
index 9cb9583..de8b5bb 100755
--- a/tools/parse-email.sh
+++ b/tools/parse-email.sh
@@ -33,8 +33,7 @@ getheader () # <header_name> <email_file>
 
 subject=$(getheader Subject "$1")
 from=$(getheader From "$1")
-msgid=$(getheader Message-Id "$1")
-[ -n "$msgid" ] || msgid=$(getheader Message-ID "$1")
+msgid=$(getheader Message-[iI][dD] "$1")
 pwid=$(getheader X-Patchwork-Id "$1")
 listid=$(getheader List-Id "$1")
 reply=$(getheader In-Reply-To "$1")
-- 
2.27.0



More information about the ci mailing list