From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B70D02C50 for ; Mon, 20 Feb 2017 12:16:36 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 20 Feb 2017 03:16:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,186,1484035200"; d="scan'208";a="67363521" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.61]) by fmsmga005.fm.intel.com with SMTP; 20 Feb 2017 03:16:33 -0800 Received: by (sSMTP sendmail emulation); Mon, 20 Feb 2017 11:16:33 +0000 Date: Mon, 20 Feb 2017 11:16:33 +0000 From: Bruce Richardson To: David Hunt Cc: dev@dpdk.org, thomas.monjalon@6wind.com Message-ID: <20170220111632.GA144436@bricha3-MOBL3.ger.corp.intel.com> References: <1487563713-165778-1-git-send-email-david.hunt@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487563713-165778-1-git-send-email-david.hunt@intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.7.2 (2016-11-26) Subject: Re: [dpdk-dev] [PATCH v1] scripts: make checkpatch cleaner for renamed files 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: Mon, 20 Feb 2017 11:16:37 -0000 On Mon, Feb 20, 2017 at 04:08:33AM +0000, David Hunt wrote: > When a file is renamed, a normal diff will include all the code of > the renamed file, and checkpatch will find warnings and errors, > even though it's just a rename. > > This change will result in a 'rename' line in the diff, resulting > in a much cleaner checkpatches result. > > Signed-off-by: David Hunt > --- > devtools/checkpatches.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index cfe262b..6fbfb50 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -89,7 +89,8 @@ check () { # > if [ -n "$1" ] ; then > report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null) > elif [ -n "$2" ] ; then > - report=$(git format-patch --no-stat --stdout -1 $commit | > + report=$(git format-patch --find-renames \ > + --no-stat --stdout -1 $commit | > $DPDK_CHECKPATCH_PATH $options - 2>/dev/null) > else > report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null) > -- This seems a good idea. Renaming legacy files which aren't checkpatch clean throws up lots of issues that we don't want to fix as part of the rename. Acked-by: Bruce Richardson <bruce.richardson@intel.com>