scripts: check spacing after commit references
authorThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 5 Jul 2016 16:24:21 +0000 (18:24 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 10 Jul 2016 14:34:11 +0000 (16:34 +0200)
A blank line between "Fixes" and "Signed-off-by" helps to
separate information in blocks.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
scripts/check-git-log.sh

index 7ea4458..6f07bda 100755 (executable)
@@ -129,6 +129,12 @@ bad=$(echo "$tags" |
        sed 's,^.,\t&,')
 [ -z "$bad" ] || printf "Wrong tag:\n$bad\n"
 
+# check blank line after last Fixes: tag
+bad=$(echo "$bodylines" |
+       sed -n 'N;/\nFixes:/D;/\n$/D;/^Fixes:/P' |
+       sed 's,^.,\t&,')
+[ -z "$bad" ] || printf "Missing blank line after 'Fixes' tag:\n$bad\n"
+
 # check missing Fixes: tag
 bad=$(for fix in $fixes ; do
        git log --format='%b' -1 $fix | grep -q '^Fixes: ' ||