From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH] devtools: check stable tag in fixes Date: Tue, 17 Jan 2017 15:54:32 +0100 Message-ID: <1484664872-26859-1-git-send-email-thomas.monjalon@6wind.com> Cc: Yuanhan Liu To: dev@dpdk.org Return-path: Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by dpdk.org (Postfix) with ESMTP id 7CA242A62 for ; Tue, 17 Jan 2017 15:55:00 +0100 (CET) Received: by mail-lf0-f49.google.com with SMTP id z134so106363960lff.3 for ; Tue, 17 Jan 2017 06:55:00 -0800 (PST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The tag "Cc: stable@dpdk.org" must be set when the commit must be backported to a stable branch. It must be located just below the "Fixes:" tag (without blank line) and followed by a blank line, separated from SoB and review tags below. Signed-off-by: Thomas Monjalon --- devtools/check-git-log.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh index f6a35d2..9f1b435 100755 --- a/devtools/check-git-log.sh +++ b/devtools/check-git-log.sh @@ -170,9 +170,9 @@ bad=$(echo "$tags" | sed 's,^.,\t&,') [ -z "$bad" ] || printf "Wrong tag:\n$bad\n" -# check blank line after last Fixes: tag +# check blank line (or Cc: stable) after last Fixes: tag bad=$(echo "$bodylines" | - sed -n 'N;/\nFixes:/D;/\n$/D;/^Fixes:/P' | + sed -n 'N;/\nFixes:/D;/\nC[Cc]: stable@/D;/\n$/D;/^Fixes:/P' | sed 's,^.,\t&,') [ -z "$bad" ] || printf "Missing blank line after 'Fixes' tag:\n$bad\n" @@ -198,9 +198,15 @@ bad=$(for fixtag in $fixtags ; do done | sed 's,^,\t,') [ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n" -# check CC:stable for fixes +# check Cc: stable@dpdk.org for fixes bad=$(for fix in $stablefixes ; do - git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' || + git log --format='%b' -1 $fix | grep -qi '^Cc: *stable@dpdk.org' || git log --format='\t%s' -1 $fix done) -[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n" +[ -z "$bad" ] || printf "Should Cc: stable@dpdk.org\n$bad\n" + +# check blank line after Cc: stable@dpdk.org +bad=$(echo "$bodylines" | + sed -n 'N;/\n$/D;/^C[Cc]: stable@dpdk.org/P' | + sed 's,^.,\t&,') +[ -z "$bad" ] || printf "Missing blank line after 'Cc: stable@':\n$bad\n" -- 2.7.0