Bugzilla – Attachment 189777 Details for
Bug 41274
Incremental test runs not properly skipping Schema files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41274: Remove the exceptions from git range
d09cb78.patch (text/plain), 2.20 KB, created by
Jonathan Druart
on 2025-11-20 14:02:01 UTC
(
hide
)
Description:
Bug 41274: Remove the exceptions from git range
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-11-20 14:02:01 UTC
Size:
2.20 KB
patch
obsolete
>From d09cb78788b5ed4414792b36333a6ad7f438dfb7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 20 Nov 2025 14:58:02 +0100 >Subject: [PATCH] Bug 41274: Remove the exceptions from git range > >When listing the files from a git range we want to remove the exception >files from that list >--- > Koha/Devel/Files.pm | 28 ++++++++++++++++++++++++---- > 1 file changed, 24 insertions(+), 4 deletions(-) > >diff --git a/Koha/Devel/Files.pm b/Koha/Devel/Files.pm >index 5bae4a02642..98f8dba736f 100644 >--- a/Koha/Devel/Files.pm >+++ b/Koha/Devel/Files.pm >@@ -146,6 +146,28 @@ sub build_git_exclude { > return $exclude_list; > } > >+=head2 remove_exceptions >+ >+ @files = $file_manager->remove_exceptions($files, $filetype); >+ >+Remove from exceptions from the original file list. >+ >+=cut >+ >+sub remove_exceptions { >+ my ( $self, $files, $filetype ) = @_; >+ my @files = @$files; >+ return () unless @files; >+ my @exceptions = @{ $exceptions->{$filetype}->{ $self->{context} } // [] }; >+ if (@exceptions) { >+ my $cmd = qq{git ls-files @exceptions}; >+ my @exception_files = qx{$cmd}; >+ chomp for @exception_files; >+ @files = array_minus @files, @exception_files; >+ } >+ return @files; >+} >+ > =head2 ls_files > > my @files = $file_manager->ls_files( $filetype, $git_range ); >@@ -160,7 +182,7 @@ sub ls_files { > if ($git_range) { > $git_range =~ s|\.\.| |; > my @modified_files = qx{git diff --name-only $git_range}; >- chomp @modified_files; >+ chomp for @modified_files; > if ( $filetype eq 'pl' ) { > push @files, grep { -e && /\.(pl|PL|pm|t)$/ } @modified_files; > push @files, grep { -e && /^(svc|opac\/svc)/ } @modified_files; >@@ -169,9 +191,7 @@ sub ls_files { > } elsif ( $filetype eq 'tt' ) { > push @files, grep { -e && /\.(tt|inc)$/ } @modified_files; > } >- >- my @exception_files = $exceptions->{$filetype}->{ $self->{context} }; >- @files = array_minus( @files, @exception_files ); >+ @files = $self->remove_exceptions( \@files, $filetype ); > } else { > if ( $filetype eq 'pl' ) { > @files = $self->ls_perl_files; >-- >2.43.0 >
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 41274
:
189716
|
189776
| 189777 |
189778