scripts/checkpatch: roll diff tweaking into checkpatch itself
RFC PATCH 1/1 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.
--- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 --- scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-)
.gitlab-ci.d/static_checks.yml +0 -3
@@ -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
.patchew.yml +0 -3
@@ -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
scripts/checkpatch.pl +6 -1
@@ -399,7 +399,12 @@ if ($chk_branch) { 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;
Signature · 1 line
2.20.1
Quoted 11 lines · Alex Bennée
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]>--- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 --- scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 5 lines · Alex Bennée
Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway.
Quoted 8 lines
Suggested-by Daniel P. Berrangé <[email protected]>Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 --- scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-)
Quoted 11 lines · Alex Bennée
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]>--- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 --- scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-)
Clever.
Quoted 9 lines · Alex Bennée
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]>--- .gitlab-ci.d/static_checks.yml | 3 --- .patchew.yml | 3 ---
ah, there is the patchew configuration file.
Quoted 2 lines
scripts/checkpatch.pl | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-)
Quoted 47 lines
.gitlab-ci.d/static_checks.yml +0
-3@@ -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.patchew.yml +0
-3@@ -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: truescripts/checkpatch.pl +6
-1@@ -399,7 +399,12 @@ if ($chk_branch) { 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;