From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5584D374E for ; Mon, 20 Feb 2017 12:08:17 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2017 03:08:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,186,1484035200"; d="scan'208";a="60415813" Received: from silpixa00397515.ir.intel.com (HELO silpixa00397515.ger.corp.intel.com) ([10.237.223.14]) by orsmga004.jf.intel.com with ESMTP; 20 Feb 2017 03:08:15 -0800 From: David Hunt To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, David Hunt Date: Mon, 20 Feb 2017 04:08:33 +0000 Message-Id: <1487563713-165778-1-git-send-email-david.hunt@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [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:08:17 -0000 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) -- 2.7.4