aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci-checkpatches.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci-checkpatches.sh')
-rwxr-xr-xscripts/ci-checkpatches.sh18
1 files changed, 5 insertions, 13 deletions
diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh
index 383045cd7..4ce077342 100755
--- a/scripts/ci-checkpatches.sh
+++ b/scripts/ci-checkpatches.sh
@@ -2,22 +2,14 @@
PATCHES=$1
echo "Run checkpatch for ${PATCHES}"
-# Generate patches provided with $1.
-# In case of force push and range is broken
-# validate only the latest commit if it's not merge commit.
+# Generate patches provided with $1. If commit range is not available validate
+# only the latest commit.
if [ "$PATCHES" = "" ]; then
git format-patch -1 -M HEAD;
- perl ./scripts/checkpatch.pl *.patch;
- exit $?
+else
+ git format-patch ${PATCHES}
fi
-git show --summary HEAD| grep -q '^Merge:';
-if [ $? -ne 0 ]; then
- git format-patch -1 -M HEAD;
- perl ./scripts/checkpatch.pl *.patch;
- exit $?
-fi
-
-git format-patch ${PATCHES}
perl ./scripts/checkpatch.pl *.patch;
+exit $?