CI: Fix check patch to handle renames / deletes

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
This commit is contained in:
Brennan Ashton 2020-09-03 14:14:06 -07:00 committed by Matias N
parent 5107104bbe
commit 6d3269a69d
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ jobs:
run: |
echo "::add-matcher::nuttx/.github/nxstyle.json"
cd nuttx
commits=`git log -1 --merges --pretty=format:%P | awk -F" " '{ print $1 ".." $2 }'`
commits="${{ github.event.pull_request.base.sha }}..HEAD"
git log --oneline $commits
echo "../nuttx/tools/checkpatch.sh -g $commits"
../nuttx/tools/checkpatch.sh -g $commits

View File

@ -91,7 +91,7 @@ check_patch() {
}
check_commit() {
diffs=`git show $1`
diffs=`git diff $1`
check_ranges <<< "$diffs"
}