From b7e311d290cde9df8186acbd219cf41fee6d33bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20L=C3=B3pez?= Date: Thu, 11 Jan 2024 11:09:16 +0100 Subject: [PATCH] scripts/check-signed-off: use --format instead of --pretty in git show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only want a specific format for the given commits, so specify it via --format directly. Signed-off-by: Carlos López --- scripts/check-signed-off.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check-signed-off.sh b/scripts/check-signed-off.sh index 8171b6a5d..a8fd98da1 100755 --- a/scripts/check-signed-off.sh +++ b/scripts/check-signed-off.sh @@ -44,7 +44,7 @@ fi start=$1 end=$2 -commits=$(git log "${start}".."${end}" --pretty=format:"%H") +commits=$(git log "${start}".."${end}" --format="%H") for c in ${commits[@]}; do echo "Checking $c" @@ -59,8 +59,8 @@ for c in ${commits[@]}; do exit 1 fi - commit_email=$(git show --no-patch --pretty="format:%ae" "$c" || exit 1) - commit_name=$(git show --no-patch --pretty="format:%an" "$c" || exit 1) + commit_email=$(git show --no-patch --format="%ae" "$c" || exit 1) + commit_name=$(git show --no-patch --format="%an" "$c" || exit 1) sign_names=$(git show --no-patch "$c" | sed -nr 's/^[[:space:]]*Signed-off-by: (.*) <(.*)>/\1/p' || exit 1) sign_emails=$(git show --no-patch "$c" | sed -nr 's/^[[:space:]]*Signed-off-by: (.*) <(.*)>/\2/p' || exit 1)