From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id AD1216CC4 for ; Wed, 6 Jul 2016 15:41:50 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id f126so174261515wma.1 for ; Wed, 06 Jul 2016 06:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gXgUCi2OaRXjUh2vdRKtQ6qM+aQEnldQMolEJLdC7qI=; b=dXceedkiEW3+ioDAEe6mxD0V0vAQvXEjhRIahG3whhakzRER0H8F4hLbksYPwkzUiE hFPJyNSEPrBwXmYZ/JIe/+ZCzLfo06C4krvU5kyE1eX1aQRBnmBviaQIZch9LssnCyuv peYlDxg/bc3ZTEiTfAn99wDxLaYYqf5Y/dWiZjiyT/xfu/GbRXdyS8D019JxYW9Yn8UC s5ApCkIXdAg/FbDOY9fXz5kb0GfwCjESmA453oHOJiEmy2cyXuZHnrNYntwxwB9N+dyk y0q/fjVxcbBnQ/eqzl+5kXmf9ORt3l/P5ZnbQlGVPmnafLdYNGtFVXzvLSpwNEq+bz7H 611g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gXgUCi2OaRXjUh2vdRKtQ6qM+aQEnldQMolEJLdC7qI=; b=D1Zv6IwijVs4Yg459B9+UNUcarGpFX9VPREw8jo4QuPdDgl5y2IOeQflwfD8cDSktG cIxqhv/NeTBzrdlQ4SGgGuJeDocRh2d6bJRBeDg7G7HFFRewNhMx0Zs895BKPKUYkmGx lx9sxBgQlSCu7LdxNZCEN73OEtb2XMRhMNKB1lHmraMt0mlz/hrBIiTrzszjrnmkYvvN XBIoLuN8oWKxLCii4ALb1qPX/0dGXwZdL2z/aaydUAt+DZi2Ob4uMpHQ3q3+YklR17h8 dTSvlj/jd0qG+Ro0Wg2w1ETkPGdGPOVGAHd0gq31QWddrRfGdUUpnEJhtA5E3kfccmWP wYDw== X-Gm-Message-State: ALyK8tIJmhPar+iEV7JPfYiFS4BhblZT4MOL8XmNArVs25x6Mzg8pvNri5HG9xdbt/OmP+uZ X-Received: by 10.194.157.162 with SMTP id wn2mr22854757wjb.103.1467812510447; Wed, 06 Jul 2016 06:41:50 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id xs9sm4077543wjc.11.2016.07.06.06.41.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 06:41:49 -0700 (PDT) From: Thomas Monjalon To: bruce.richardson@intel.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org Date: Wed, 6 Jul 2016 15:41:44 +0200 Message-Id: <1467812504-24742-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467801530-20800-4-git-send-email-thomas.monjalon@6wind.com> References: <1467801530-20800-4-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2] scripts: check headline of drivers commits X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2016 13:41:50 -0000 From: Nelio Laranjeiro A driver patch under net should start with "net/" or if a patch touch multiple drivers, it should only start with "net:". The same apply for crypto. A patch touching all drivers (net + crypto) should start with "drivers:". Longer prefixes like "net/mlx:" (for mlx4/mlx5) or "net/e1000/base:" are handled by not checking the colon. The directories doc/ and config/ are ignored because a driver patch can modify them. Signed-off-by: Nelio Laranjeiro Signed-off-by: Thomas Monjalon --- v2: - fix capture in bad variable - ignore doc/ and config/ --- scripts/check-git-log.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 833aa39..21f1055 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -70,6 +70,24 @@ bad=$(echo "$headlines" | grep --color=always \ | sed 's,^,\t,') [ -z "$bad" ] || printf "Wrong headline format:\n$bad\n" +# check headline prefix when touching only drivers, e.g. net/ +bad=$(for commit in $commits ; do + headline=$(git log --format='%s' -1 $commit) + files=$(git diff-tree --no-commit-id --name-only -r $commit) + [ -z "$(echo "$files" | grep -v '^\(drivers\|doc\|config\)/')" ] || + continue + drv=$(echo "$files" | grep '^drivers/' | cut -d "/" -f 2,3 | sort -u) + drvgrp=$(echo "$drv" | cut -d "/" -f 1 | uniq) + if [ $(echo "$drvgrp" | wc -l) -gt 1 ] ; then + echo "$headline" | grep -v '^drivers:' + elif [ $(echo "$drv" | wc -l) -gt 1 ] ; then + echo "$headline" | grep -v "^$drvgrp" + else + echo "$headline" | grep -v "^$drv" + fi +done | sed 's,^,\t,') +[ -z "$bad" ] || printf "Wrong headline prefix:\n$bad\n" + # check headline label for common typos bad=$(echo "$headlines" | grep --color=always \ -e '^example[:/]' \ -- 2.7.0