Skip to content

Commit

Permalink
scripts/checkpatch: roll diff tweaking into checkpatch itself
Browse files Browse the repository at this point in the history
Rather than relying on external tweaks lets just do it inside
checkpatch's direct commitish handling which is QEMU specific code
anyway.

Suggested-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Willian Rampazzo <[email protected]>
Reviewed-by: Wainer dos Santos Moschetta <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
stsquad committed Jun 25, 2021
1 parent ae63ed1 commit 66cf701
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .gitlab-ci.d/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ check-patch:
needs:
job: amd64-centos8-container
script:
- git config --local diff.renamelimit 0
- git config --local diff.renames True
- git config --local diff.algorithm histogram
- .gitlab-ci.d/check-patch.py
variables:
GIT_DEPTH: 1000
Expand Down
3 changes: 0 additions & 3 deletions .patchew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ testing:
script: |
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
docker-mingw@fedora:
enabled: true
Expand Down
7 changes: 6 additions & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,12 @@ sub build_types {
my $num_patches = @patches;
for my $hash (@patches) {
my $FILE;
open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) ||
open($FILE, '-|', "git",
"-c", "diff.renamelimit=0",
"-c", "diff.renames=True",
"-c", "diff.algorithm=histogram",
"show",
"--patch-with-stat", $hash) ||
die "$P: git show $hash - $!\n";
while (<$FILE>) {
chomp;
Expand Down

0 comments on commit 66cf701

Please sign in to comment.