diff options
author | Zheng Bao <fishbaozi@gmail.com> | 2023-03-01 12:35:14 +0800 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-05-26 21:16:32 +0000 |
commit | e8183599aec0d09789da40fb720339f9f42a53df (patch) | |
tree | 12b3dd10e0e4840fc40580abdbe9ab69350d6413 /util/gitconfig | |
parent | 247ec33eb995ebb10b423f86e965666e3a0ac8fa (diff) |
commit-msg: Match the Signed-off-by line with name and mail address
The previous regular expression only matches the line starting with
"Signed-off-by:". If the name and mail address are missing, it can not
find out. The following words should be "name <mail@xxx.com>".
Change-Id: I42cc399e79b65928a6aef87c51e5476c7158d166
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73340
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'util/gitconfig')
-rwxr-xr-x | util/gitconfig/commit-msg | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/gitconfig/commit-msg b/util/gitconfig/commit-msg index 99c8941be4..08f04ffe8d 100755 --- a/util/gitconfig/commit-msg +++ b/util/gitconfig/commit-msg @@ -166,7 +166,7 @@ _gen_ChangeId() { git hash-object -t commit --stdin } -if ! grep -qi '^[[:space:]]*Signed-off-by:' "$MSG"; then +if ! grep -qi '^[[:space:]]*Signed-off-by:.\+<.\+@.\+>' "$MSG"; then printf "\nError: No Signed-off-by line in the commit message.\n" exit 1 fi |