提交 255d3086 编写于 作者: C Cleber Rosa

selftests/signedoff-check.sh: ignore merge commits

When CI systems work on branches for testing, they usually create
merge commits.  And those won't be signed, specially not from the
author of the other commits.

Let's skip the merge commits to work around that.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 d8353eed
#!/bin/sh -e
AUTHOR="$(git log -1 --pretty='format:%aN <%aE>')"
git log -1 --pretty=format:%B | grep "Signed-off-by: $AUTHOR"
AUTHOR="$(git log --no-merges -1 --pretty='format:%aN <%aE>')"
git log --no-merges -1 --pretty=format:%B | grep "Signed-off-by: $AUTHOR"
if [ $? != 0 ]; then
echo "The commit message does not contain author's signature (Signed-off-by: $AUTHOR)"
return 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册