From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 3/3] scripts: check headline of drivers commits Date: Wed, 06 Jul 2016 15:15:28 +0200 Message-ID: <1575942.agmeWBiVAh@xps13> References: <1467801530-20800-1-git-send-email-thomas.monjalon@6wind.com> <1467801530-20800-4-git-send-email-thomas.monjalon@6wind.com> <20160706115927.GE14792@autoinstall.dev.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: =?ISO-8859-1?Q?N=E9lio?= Laranjeiro Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 831D66CBD for ; Wed, 6 Jul 2016 15:15:30 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id z126so111335743wme.0 for ; Wed, 06 Jul 2016 06:15:30 -0700 (PDT) In-Reply-To: <20160706115927.GE14792@autoinstall.dev.6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-06 13:59, N=E9lio Laranjeiro: > > +# check headline prefix when touching only drivers/, e.g. net/ > > +bad=3D$(for commit in $commits ; do > > +=09headline=3D$(git log --format=3D'%s' -1 $commit) > > +=09files=3D$(git diff-tree --no-commit-id --name-only -r $commit) > > +=09[ -z "$(echo "$files" | grep -v '^drivers/')" ] || continue > > +=09driversgrp=3D$(echo "$files" | cut -d "/" -f 2 | sort -u) > > +=09drivers=3D$(echo "$files" | cut -d "/" -f 2,3 | sort -u) > > +=09if [ $(echo "$driversgrp" | wc -l) -gt 1 ] ; then > > +=09=09bad=3D$(echo "$headline" | grep -v '^drivers:') >=20 > I think you forgot the '$' for drivers in the line just above. No it is a plain "drivers:" for cases where we have net and crypto. (it is an addition from your original idea) But I forgot to remove bad=3D$( which I've moved to the first line. > > +=09elif [ $(echo "$drivers" | wc -l) -gt 1 ] ; then > > +=09=09bad=3D$(echo "$headline" | grep -v "^$driversgrp") > > +=09else > > +=09=09bad=3D$(echo "$headline" | grep -v "^$drivers") > > +=09fi > > +done | sed 's,^,\t,') > > +[ -z "$bad" ] || printf "Wrong headline prefix:\n$bad\n" >=20 > Otherwise it seems good. V2 on going