From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 3833C684E for ; Tue, 5 Jul 2016 17:54:35 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id a66so158792502wme.0 for ; Tue, 05 Jul 2016 08:54:35 -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; bh=KM+IWfZhy2J1Z2mULcrGrnsjMIbt3kwNnwMYRHl3nUc=; b=uOBgIjs/m1WtF+wmbmvbdzFMHSnm5XT7UtH5Y1BvybpytLKZzioEYQ7IJni1WB2gfj 4V1NZ4hft0NAnYxyuIStvpkqIpN92v5hI4mo82rQ1m8lN9HBjPMRxEmN37jYqxuFyDWs 2HYEV+fmpz42uOzIa0URh0nTLkrMarP8ZvIjmn8H8yKXo+Y8b2XgUeZzK+MiQNLpAPko WADgRdyWFz69As/8BnFYtm7gjqO9kZFja8pHtWA5HfXNfjW+FlusTzc9NWfX0tNQGaa+ K3feYK7zQ2w6ezq3Ad5lSKDgSeLrLI2k/1QA+Yl6gYbMlzurZ9muEqlsuYn7L5L2sWNb d14w== 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; bh=KM+IWfZhy2J1Z2mULcrGrnsjMIbt3kwNnwMYRHl3nUc=; b=nNCOe51BC63wodqqEft0xul7ABKrONSGJuJtpmLkfcBSOFNq3RxTAAM4YVM2XXLrGm HS1R/pwEoKGooznELZBSu1AjclO3/BvaYpwJd510ACKxl9fnU7sPCKatBtp241NxhugE pOMMnrEDzh5xKmmasRjda7C1vNN69GgZTzQLCS0fJwDEd4AGkZDbaLsebbmD3wxKyPgI GthkQ/1aifNusZIy2V1hSX5BT10xfs/4I6Fs8ZwH3PyDzrCdmf6TTf7g18EeC7BW3Obs EOh4vimQNKabBZoXx8w9ipTo6PTVKmq8kSoJb4HcuY1tmUf14/roK7ZeJqdLSJ603aAG maJg== X-Gm-Message-State: ALyK8tKGD+WJSYBURkjXMt1nW1ati0VX8X5axD9WHqczSlmusW1uvG7Rby6GTPJHPr7B6nV3 X-Received: by 10.28.97.4 with SMTP id v4mr17007640wmb.71.1467734075020; Tue, 05 Jul 2016 08:54:35 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id g195sm3423935wme.23.2016.07.05.08.54.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 08:54:34 -0700 (PDT) From: Thomas Monjalon To: bruce.richardson@intel.com Cc: dev@dpdk.org Date: Tue, 5 Jul 2016 17:54:26 +0200 Message-Id: <1467734066-18240-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] scripts: fix commit check of first word 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: Tue, 05 Jul 2016 15:54:35 -0000 The first word of each commit message is checked. But when the commit range was greater than 1, only the latest commit was checked. It is fixed by checking each commit separately. Fixes: 9c24780f0d5e ("scripts: check first word of commit messages") Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 7d2c7ee..c7fc0e4 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -49,6 +49,7 @@ fi range=${1:-origin/master..} +commits=$(git log --format='%h' $range) headlines=$(git log --format='%s' $range) bodylines=$(git log --format='%b' $range) tags=$(git log --format='%b' $range | grep -i -e 'by *:' -e 'fix.*:') @@ -115,9 +116,10 @@ bad=$(echo "$bodylines" | grep -v '^Fixes:' | awk 'length>75 {print}' | sed 's,^ [ -z "$bad" ] || printf "Line too long:\n$bad\n" # check starting commit message with "It" -bad=$(echo "$bodylines" | head -n1 | grep -E --color=always \ - -ie '^It ' \ - | sed 's,^,\t,') +bad=$(for commit in $commits ; do + firstbodyline=$(git log --format='%b' -1 $commit | head -n1) + echo "$firstbodyline" | grep --color=always -ie '^It ' +done | sed 's,^,\t,') [ -z "$bad" ] || printf "Wrong beginning of commit message:\n$bad\n" # check tags spelling -- 2.7.0