All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself
@ 2021-06-07 17:18 Alex Bennée
  2021-06-07 17:29 ` Daniel P. Berrangé
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alex Bennée @ 2021-06-07 17:18 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, berrange, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, 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é <berrange@redhat.com>
Signed-off-by: Alex Bennée <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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself
  2021-06-07 17:18 [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself Alex Bennée
@ 2021-06-07 17:29 ` Daniel P. Berrangé
  2021-06-07 18:07 ` Willian Rampazzo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2021-06-07 17:29 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Willian Rampazzo, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé

On Mon, Jun 07, 2021 at 06:18:29PM +0100, Alex Bennée wrote:
> 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>
> ---
>  .gitlab-ci.d/static_checks.yml | 3 ---
>  .patchew.yml                   | 3 ---
>  scripts/checkpatch.pl          | 7 ++++++-
>  3 files changed, 6 insertions(+), 7 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: 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 :|



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself
  2021-06-07 17:18 [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself Alex Bennée
  2021-06-07 17:29 ` Daniel P. Berrangé
@ 2021-06-07 18:07 ` Willian Rampazzo
  2021-06-08  6:35 ` Philippe Mathieu-Daudé
  2021-06-08 12:52 ` Wainer dos Santos Moschetta
  3 siblings, 0 replies; 5+ messages in thread
From: Willian Rampazzo @ 2021-06-07 18:07 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Thomas Huth, Daniel Berrange, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé

On Mon, Jun 7, 2021 at 2:18 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> 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>
> ---
>  .gitlab-ci.d/static_checks.yml | 3 ---
>  .patchew.yml                   | 3 ---
>  scripts/checkpatch.pl          | 7 ++++++-
>  3 files changed, 6 insertions(+), 7 deletions(-)
>

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself
  2021-06-07 17:18 [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself Alex Bennée
  2021-06-07 17:29 ` Daniel P. Berrangé
  2021-06-07 18:07 ` Willian Rampazzo
@ 2021-06-08  6:35 ` Philippe Mathieu-Daudé
  2021-06-08 12:52 ` Wainer dos Santos Moschetta
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-06-08  6:35 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Willian Rampazzo, Thomas Huth, berrange, Wainer dos Santos Moschetta

On 6/7/21 7:18 PM, Alex Bennée wrote:
> 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>
> ---
>  .gitlab-ci.d/static_checks.yml | 3 ---
>  .patchew.yml                   | 3 ---
>  scripts/checkpatch.pl          | 7 ++++++-
>  3 files changed, 6 insertions(+), 7 deletions(-)

Clever.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself
  2021-06-07 17:18 [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself Alex Bennée
                   ` (2 preceding siblings ...)
  2021-06-08  6:35 ` Philippe Mathieu-Daudé
@ 2021-06-08 12:52 ` Wainer dos Santos Moschetta
  3 siblings, 0 replies; 5+ messages in thread
From: Wainer dos Santos Moschetta @ 2021-06-08 12:52 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Willian Rampazzo, Thomas Huth, berrange, Philippe Mathieu-Daudé


On 6/7/21 2:18 PM, Alex Bennée wrote:
> 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>
> ---
>   .gitlab-ci.d/static_checks.yml | 3 ---
>   .patchew.yml                   | 3 ---
ah, there is the patchew configuration file.
>   scripts/checkpatch.pl          | 7 ++++++-
>   3 files changed, 6 insertions(+), 7 deletions(-)

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

>
> 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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-08 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 17:18 [RFC PATCH] scripts/checkpatch: roll diff tweaking into checkpatch itself Alex Bennée
2021-06-07 17:29 ` Daniel P. Berrangé
2021-06-07 18:07 ` Willian Rampazzo
2021-06-08  6:35 ` Philippe Mathieu-Daudé
2021-06-08 12:52 ` Wainer dos Santos Moschetta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.