CI: Fix check patch to handle renames / deletes
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
This commit is contained in:
parent
5107104bbe
commit
6d3269a69d
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
@ -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
|
||||
|
@ -91,7 +91,7 @@ check_patch() {
|
||||
}
|
||||
|
||||
check_commit() {
|
||||
diffs=`git show $1`
|
||||
diffs=`git diff $1`
|
||||
check_ranges <<< "$diffs"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user