diff mbox series

[v2,12/12] scripts/checkpatch.pl: fix git-show invocation to include diffstat

Message ID 20210114165730.31607-13-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show
Series testing/next (tags!, shippable/travis deprecation, regression fixes, checkpatch) | expand

Commit Message

Alex Bennée Jan. 14, 2021, 4:57 p.m. UTC
Without this checkpatch keeps complaining about new/changed files even
when MAINTAINERS has been updated. Normal invocations of checkpatch on
patch files rather than commit IDs are unaffected.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Jan. 14, 2021, 6:05 p.m. UTC | #1
On 1/14/21 5:57 PM, Alex Bennée wrote:
> Without this checkpatch keeps complaining about new/changed files even
> when MAINTAINERS has been updated. Normal invocations of checkpatch on
> patch files rather than commit IDs are unaffected.
> 

Nice!

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(with Lukas's path and yours)

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Willian Rampazzo Jan. 14, 2021, 7:51 p.m. UTC | #2
On Thu, Jan 14, 2021 at 2:22 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Without this checkpatch keeps complaining about new/changed files even
> when MAINTAINERS has been updated. Normal invocations of checkpatch on
> patch files rather than commit IDs are unaffected.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 88c858f67c..e47ad878d8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -399,7 +399,7 @@  if ($chk_branch) {
 	my $num_patches = @patches;
 	for my $hash (@patches) {
 		my $FILE;
-		open($FILE, '-|', "git", "show", $hash) ||
+		open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) ||
 			die "$P: git show $hash - $!\n";
 		while (<$FILE>) {
 			chomp;