[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 3/8] scripts/checkpatch: roll diff tweaking into checkpatch it
From: |
Alex Bennée |
Subject: |
[PATCH v1 3/8] scripts/checkpatch: roll diff tweaking into checkpatch itself |
Date: |
Wed, 23 Jun 2021 11:27:44 +0100 |
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é <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210607171829.25111-1-alex.bennee@linaro.org>
---
.gitlab-ci.d/static_checks.yml | 3 ---
.patchew.yml | 3 ---
scripts/checkpatch.pl | 7 ++++++-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
index 7e685c6a65..c5fa4fce26 100644
--- a/.gitlab-ci.d/static_checks.yml
+++ b/.gitlab-ci.d/static_checks.yml
@@ -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
diff --git a/.patchew.yml b/.patchew.yml
index 2638b7f564..1b78262ce5 100644
--- a/.patchew.yml
+++ b/.patchew.yml
@@ -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
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bbcd25ae05..cb8eff233e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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;
--
2.20.1
- [PATCH v1 0/8] misc fixes pre-PR (docs, plugins, tests), Alex Bennée, 2021/06/23
- [PATCH v1 1/8] tests/acceptance: tweak the tcg/kvm tests for virt, Alex Bennée, 2021/06/23
- [PATCH v1 2/8] docs/devel: Add a single top-level header to MTTCG's doc, Alex Bennée, 2021/06/23
- [PATCH v1 6/8] tests/tcg: skip the signals test for hppa/s390x for now, Alex Bennée, 2021/06/23
- [PATCH v1 3/8] scripts/checkpatch: roll diff tweaking into checkpatch itself,
Alex Bennée <=
- [PATCH v1 5/8] GitLab: Add "Feature Request" issue template., Alex Bennée, 2021/06/23
- [PATCH v1 4/8] GitLab: Add "Bug" issue reporting template, Alex Bennée, 2021/06/23
- [PATCH v1 8/8] Update documentation to refer to new location for issues, Alex Bennée, 2021/06/23
- [PATCH v1 7/8] plugins/api: expose symbol lookup to plugins, Alex Bennée, 2021/06/23