Skip to content

Commit 66cf701

Browse files
committed
scripts/checkpatch: roll diff tweaking into checkpatch itself
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]>
1 parent ae63ed1 commit 66cf701

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.gitlab-ci.d/static_checks.yml

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ check-patch:
44
needs:
55
job: amd64-centos8-container
66
script:
7-
- git config --local diff.renamelimit 0
8-
- git config --local diff.renames True
9-
- git config --local diff.algorithm histogram
107
- .gitlab-ci.d/check-patch.py
118
variables:
129
GIT_DEPTH: 1000

.patchew.yml

-3
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ testing:
138138
script: |
139139
#!/bin/bash
140140
git rev-parse base > /dev/null || exit 0
141-
git config --local diff.renamelimit 0
142-
git config --local diff.renames True
143-
git config --local diff.algorithm histogram
144141
./scripts/checkpatch.pl --mailback base..
145142
docker-mingw@fedora:
146143
enabled: true

scripts/checkpatch.pl

+6-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,12 @@ sub build_types {
399399
my $num_patches = @patches;
400400
for my $hash (@patches) {
401401
my $FILE;
402-
open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) ||
402+
open($FILE, '-|', "git",
403+
"-c", "diff.renamelimit=0",
404+
"-c", "diff.renames=True",
405+
"-c", "diff.algorithm=histogram",
406+
"show",
407+
"--patch-with-stat", $hash) ||
403408
die "$P: git show $hash - $!\n";
404409
while (<$FILE>) {
405410
chomp;

0 commit comments

Comments
 (0)