From: David Hunt Date: Mon, 20 Feb 2017 04:08:33 +0000 (+0000) Subject: devtools: make checkpatch cleaner for renamed files X-Git-Tag: spdx-start~4459 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3ef24b3d35d732c18ea3d68b30979506bfb1320e;p=dpdk.git 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 Acked-by: Bruce Richardson --- diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index cfe262bec4..78e155e605 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -89,7 +89,7 @@ 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)