Skip to content

Commit

Permalink
checkpatch: fix master branch "no commit" error
Browse files Browse the repository at this point in the history
Checkpatch-ignore:SPDX_LICENSE_TAG
  • Loading branch information
erhankur committed Dec 31, 2024
1 parent 4b1e752 commit 887296a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/checkpatch-esp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later

since=${1:-origin/master}
tools/scripts/checkpatch.pl --git ${since}..
commit_count=$(git rev-list --count "${since}..HEAD")
if [ "$commit_count" -eq 0 ]; then
echo "No new commits between '${since}' and 'master'."
exit 0
fi
tools/scripts/checkpatch.pl --git ${since}..HEAD

0 comments on commit 887296a

Please sign in to comment.