From: David Hunt <david.hunt@intel.com>
To: dev@dpdk.org
Cc: thomas.monjalon@6wind.com, David Hunt <david.hunt@intel.com>
Subject: [dpdk-dev] [PATCH v1] scripts: make checkpatch cleaner for renamed files
Date: Mon, 20 Feb 2017 04:08:33 +0000 [thread overview]
Message-ID: <1487563713-165778-1-git-send-email-david.hunt@intel.com> (raw)
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 <david.hunt@intel.com>
---
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 () { # <patch> <commit> <title>
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
next reply other threads:[~2017-02-20 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 4:08 David Hunt [this message]
2017-02-20 11:16 ` Bruce Richardson
2017-02-21 11:24 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487563713-165778-1-git-send-email-david.hunt@intel.com \
--to=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).