devtools: make checkpatch cleaner for renamed files

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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
David Hunt 2017-02-20 04:08:33 +00:00 committed by Thomas Monjalon
parent 93092a5610
commit 3ef24b3d35

View File

@ -89,7 +89,7 @@ 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)