Skip to content

Commit

Permalink
scripts/check-signed-off: use --format instead of --pretty in git show
Browse files Browse the repository at this point in the history
We only want a specific format for the given commits, so specify it
via --format directly.

Signed-off-by: Carlos López <carlos.lopez@suse.com>
  • Loading branch information
00xc committed Jan 11, 2024
1 parent 971ed21 commit b7e311d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/check-signed-off.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)

Expand Down

0 comments on commit b7e311d

Please sign in to comment.