Bugzilla – Attachment 178113 Details for
Bug 39115
Tidy script should list the files we do not want to tidy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39115: Finally use ':(exclude)' and grep
Bug-39115-Finally-use-exclude-and-grep.patch (text/plain), 1.51 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-02-14 17:25:00 UTC
(
hide
)
Description:
Bug 39115: Finally use ':(exclude)' and grep
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-02-14 17:25:00 UTC
Size:
1.51 KB
patch
obsolete
>From ebc9850b5890e7b5bbd999492094c86e7a33e6d1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 13 Feb 2025 16:04:07 +0100 >Subject: [PATCH] Bug 39115: Finally use ':(exclude)' and grep > >This was not working: >% git ls-files Koha/Schema.pm --exclude='Koha/Schema/Result' --exclude='Koha/Schema.pm' >Koha/Schema.pm > >The efficiency of the script is getting worse and it will need to be >rewritten. >The xt/tt_tidy.t will take longer. > >But at least it should work correctly now > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > misc/devel/tidy.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/devel/tidy.pl b/misc/devel/tidy.pl >index d67751bd2b5..1445cc30288 100755 >--- a/misc/devel/tidy.pl >+++ b/misc/devel/tidy.pl >@@ -49,7 +49,7 @@ if (@files) { > @files = map { > my $file = $_; > my $filetype = get_filetype($file); >- my $cmd = sprintf q{git ls-files %s %s}, $file, build_git_exclude($filetype); >+ my $cmd = sprintf q{git ls-files %s | grep %s}, build_git_exclude($filetype), $file; > my $output = qx{$cmd}; > chomp $output; > $output ? $file : (); >@@ -139,7 +139,7 @@ sub tidy { > > sub build_git_exclude { > my ($filetype) = @_; >- return join( " ", map( "--exclude='$_'", @{ $exceptions->{$filetype} } ) ); >+ return join( " ", map( "':(exclude)$_'", @{ $exceptions->{$filetype} } ) ); > } > > sub get_perl_files { >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39115
:
177971
|
177972
|
177979
|
177980
|
177984
|
177985
|
178003
|
178017
|
178048
|
178049
|
178050
|
178051
|
178052
|
178053
|
178108
|
178109
|
178110
|
178111
|
178112
| 178113 |
178127