From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id AAAAD1B142 for ; Tue, 29 Jan 2019 21:41:46 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4AE8123594; Tue, 29 Jan 2019 15:41:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 29 Jan 2019 15:41:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=H5bJsk8fBXm5vxr1hLz3MYPFAjo5wAbavlirBmvpVHQ=; b=KMtZXRckTLyA qC0y32qF97wMMt9u0TmZeL8R4GCvCXjUjOzQE4Zb2AivnPGVQBWOdqjYVWtGW0UB u/BNRnbGN7AJe4kIMGNRXC2KuElAWh1MeiRYsF7NseFHtVbmPaSWMqvJxdjdCL4F ztvfWxpi7KMEkbFXPQ9I2s0wNO6ooDU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=H5bJsk8fBXm5vxr1hLz3MYPFAjo5wAbavlirBmvpV HQ=; b=ZeEWDVgn6zPawsu8yVsVSLSFjZ/edF1mClX9VzyQtGd6VU4mud5eUbB8g MPU4f/T024swVCOeB84VGGTorbvHJ6LL4RPvcySqr6dFF3G91f8k5JEDeXswyNCj 8chA52oBkMWdMKaJJZK2xs0njs28M77hNKRQdDeG24VPvVsKNdkFP8KL+WYce/Xh o0xVXyPW3CFkzBXzAOSiLVFmufhO9X4cdJghA6vVtpbifdHfi1PbB+F4l0vuKq4/ 4S6O0qQDgiBjzHuu/cTf7oaFpFCgydNeotYR1ZCsv++Ti7i3eiR3nesQKFjQMKjC S3tuWNG0kH9SSbI5w3hraCKuIeKmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrjedvgddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 16DE5E4559; Tue, 29 Jan 2019 15:41:45 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, Qi Zhang , david.marchand@redhat.com Date: Tue, 29 Jan 2019 21:41:42 +0100 Message-ID: <6678803.r9xRYSV9tQ@xps> In-Reply-To: <20190129153052.38634-1-ferruh.yigit@intel.com> References: <20190129153052.38634-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] devtools: check commit log fixes syntax X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2019 20:41:47 -0000 29/01/2019 16:30, Ferruh Yigit: > Fixes line commit id length defined as 12 in fixline alias: > fixline = log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae' > > Check if the Fixes line commit id length matches the defined value. This check was missing on purpose, in order to not be too strict. I think it's OK if the length of the SHA1 is not always the same. > --- a/devtools/check-git-log.sh > +++ b/devtools/check-git-log.sh > @@ -177,6 +177,11 @@ bad=$(for fixtag in $fixtags ; do > done | sed 's,^,\t,') > [ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n" > > +bad=$(for fixtag in $fixtags ; do > + echo $fixtag | awk '{print $2}' | awk 'length != 12 {print}' > +done) > +[ -z "$bad" ] || printf "Wrong 'Fixes' syntax:\n$bad\n" > + > # 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' || If you really want to be that strict, it can be done simpler: bad=$(for fixtag in $fixtags ; do hash=$(echo "$fixtag" | sed 's,^Fixes: \([0-9a-f]*\).*,\1,') if git branch --contains $hash 2>&- | grep -q '^\*' ; then - good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-) + good=$(git log --abbrev=12 --format='Fixes: %h ("%s")' -1 $hash 2>&-) else good="reference not in current branch" fi