From 4fe45378b8dbbcc6dba6fd7d1e8769e7efad9622 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 5 Jul 2016 18:24:21 +0200 Subject: [PATCH] scripts: check spacing after commit references A blank line between "Fixes" and "Signed-off-by" helps to separate information in blocks. Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 7ea4458b1f..6f07bdaab9 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -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: ' || -- 2.20.1