diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 02799f9683..53221eda7d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh index 0171d37d19..5ba15d817f 100755 --- a/tools/checkpatch.sh +++ b/tools/checkpatch.sh @@ -91,7 +91,7 @@ check_patch() { } check_commit() { - diffs=`git show $1` + diffs=`git diff $1` check_ranges <<< "$diffs" }