mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
CI: Fix check patch to handle renames / deletes
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
This commit is contained in:
@@ -33,7 +33,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "::add-matcher::nuttx/.github/nxstyle.json"
|
echo "::add-matcher::nuttx/.github/nxstyle.json"
|
||||||
cd nuttx
|
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
|
git log --oneline $commits
|
||||||
echo "../nuttx/tools/checkpatch.sh -g $commits"
|
echo "../nuttx/tools/checkpatch.sh -g $commits"
|
||||||
../nuttx/tools/checkpatch.sh -g $commits
|
../nuttx/tools/checkpatch.sh -g $commits
|
||||||
|
|||||||
+1
-1
@@ -91,7 +91,7 @@ check_patch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_commit() {
|
check_commit() {
|
||||||
diffs=`git show $1`
|
diffs=`git diff $1`
|
||||||
check_ranges <<< "$diffs"
|
check_ranges <<< "$diffs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user