From 255d30861ad709d39f1bfec529166c1670ce505d Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 26 Apr 2019 21:11:07 -0400 Subject: [PATCH] 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: Cleber Rosa --- selftests/signedoff-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selftests/signedoff-check.sh b/selftests/signedoff-check.sh index a904c61b..0afa914c 100755 --- a/selftests/signedoff-check.sh +++ b/selftests/signedoff-check.sh @@ -1,7 +1,7 @@ #!/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 -- GitLab