From 3452c9233f623c4049098b66911ae82fc14e119c Mon Sep 17 00:00:00 2001 From: Johannes Thyssen Tishman Date: Mon, 22 Jan 2024 22:03:47 +0100 Subject: check-patches: fix non-posix regex The usage of '+' to match 'one or more occurrences' of a regex is only POSIX compliant when used in an Extended Regular Expression (ERE). Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html Signed-off-by: Johannes Thyssen Tishman Acked-by: Robin Jarry --- contrib/check-patches | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/check-patches b/contrib/check-patches index e175b32c..6ae20efb 100755 --- a/contrib/check-patches +++ b/contrib/check-patches @@ -50,7 +50,7 @@ for rev in $revisions; do err "title is longer than 72 characters, please make it shorter" fi - if ! echo "$title" | grep -q '^[a-z0-9,{}/_-]\+: '; then + if ! echo "$title" | grep -qE '^[a-z0-9,{}/_-]+: '; then err "title lacks a topic prefix (e.g. 'imap:')" fi @@ -67,8 +67,8 @@ for rev in $revisions; do done if git log --format="%(trailers:only,unfold)" -1 "$rev" | \ - grep -v '^Changelog-[a-z]\+: [A-Z`\*_].\+\.$' | \ - grep -q '^Changelog-[a-z]\+: '; then + grep -vE '^Changelog-[a-z]+: [A-Z`\*_].+\.$' | \ + grep -qE '^Changelog-[a-z]+: '; then err "Changelog-* trailers should start with a capital letter and end with a period" fi -- cgit