aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2021-02-12 14:31:49 -0700
committerMathieu Poirier <mathieu.poirier@linaro.org>2021-02-24 16:18:03 -0700
commitf724547574ca80cbf41442c7d1fea49fd5d277c4 (patch)
tree79021ba0dca563127275aacf5d5be9a4ce07ab6f
parent7ac865480d014bd2a3137196727bbffe4348af6e (diff)
get-mainline-feature: Discard patches bigger than 110 lines
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
-rwxr-xr-xget-mainline-feature14
1 files changed, 13 insertions, 1 deletions
diff --git a/get-mainline-feature b/get-mainline-feature
index c8ffd72..25a3b96 100755
--- a/get-mainline-feature
+++ b/get-mainline-feature
@@ -17,6 +17,8 @@
# $3: Name of the output file
#
+declare -i totaladd=0 totaldel=0
+
dictionary=(MAINTAINER tag defconfig dts selftest script doc
bindings kbuild kconfig coccinelle mailmap checkpatch)
@@ -41,10 +43,20 @@ for token in "${dictionary[@]}"; do
fi
done
+# Skip patches bigger than 110 lines of modifications
+while read add del file ; do
+ totaladd+=add
+ totaldel+=del
+done < <(git diff --no-renames --minimal --numstat $sha1^..$sha1)
+
+if [ $[$totaladd + $totaldel] -gt 110 ] ; then
+ exit 0
+fi
+
# See if $sha is part of the stable set in $2
if [ "$(grep $sha1 $2 | wc -l)" -eq 0 ]; then
# This patch looks like a feature, add it to the log
- echo "$sha1 $subj" >> $3
+ echo "$sha1 $totaladd $totaldel $subj" >> $3
fi
exit 0