From 712a8e6dffc317dfadee9d24b7893eecedeb33f2 Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Jan 23 2022 19:03:51 +0000 Subject: Merge branch 'scripts' into SLE15-SP2-LTSS Pull a new pre-commit sanity check. --- diff --git a/scripts/git-pre-commit b/scripts/git-pre-commit index e8161e9..8d816bd 100755 --- a/scripts/git-pre-commit +++ b/scripts/git-pre-commit @@ -43,6 +43,10 @@ while read stat file garbage; do case "$file" in patches.*/*) git cat-file blob :$file >"$tmp" + if [ -z "$(diffstat -p1 -l "$tmp")" ] ; then + echo "$file" is empty patch + err=1 + fi "$dir/check-patchhdr" $update --stdin "$file" <"$tmp" || err=1 "$dir/check-patchfmt" --stdin "$file" <"$tmp" || err=1 "$dir/check-patch-blacklist" $(dirname "$dir")/blacklist.conf "$file" <$tmp || err=1