|
Lines 42-47
my $exceptions = {
Link Here
|
| 42 |
tt => [qw(Koha/ILL/Backend/ *doc-head-open.inc misc/cronjobs/rss)], |
42 |
tt => [qw(Koha/ILL/Backend/ *doc-head-open.inc misc/cronjobs/rss)], |
| 43 |
}; |
43 |
}; |
| 44 |
|
44 |
|
|
|
45 |
my @original_files = @files; |
| 45 |
if (@files) { |
46 |
if (@files) { |
| 46 |
|
47 |
|
| 47 |
# This is inefficient if the list of files is long but most of the time we will have only one |
48 |
# This is inefficient if the list of files is long but most of the time we will have only one |
|
Lines 53-58
if (@files) {
Link Here
|
| 53 |
chomp $output; |
54 |
chomp $output; |
| 54 |
$output ? $file : (); |
55 |
$output ? $file : (); |
| 55 |
} @files; |
56 |
} @files; |
|
|
57 |
|
| 58 |
if ( scalar @files != scalar @original_files ) { |
| 59 |
my @diff = array_minus( @original_files, @files ); |
| 60 |
for my $file (@diff) { |
| 61 |
my $cmd = sprintf q{git ls-files %s}, $file; |
| 62 |
my $output = qx{$cmd}; |
| 63 |
chomp $output; |
| 64 |
unless ($output) { |
| 65 |
l( sprintf "File '%s' not in the index, will be tidy anyway", $file ); |
| 66 |
push @files, $file |
| 67 |
; # At the end of the index so the original order will be modified. This is not a feature and could be fixed later. |
| 68 |
} |
| 69 |
} |
| 70 |
} |
| 56 |
} else { |
71 |
} else { |
| 57 |
push @files, get_perl_files() if $perl_files; |
72 |
push @files, get_perl_files() if $perl_files; |
| 58 |
push @files, get_js_files() if $js_files; |
73 |
push @files, get_js_files() if $js_files; |
|
Lines 68-74
if (@files) {
Link Here
|
| 68 |
if ( $no_write && !@files ) { |
83 |
if ( $no_write && !@files ) { |
| 69 |
|
84 |
|
| 70 |
# File should not be tidy, but we need to return the content or we risk data loss |
85 |
# File should not be tidy, but we need to return the content or we risk data loss |
| 71 |
print read_file(@ARGV); |
86 |
print read_file( $original_files[0] ); |
| 72 |
exit; |
87 |
exit; |
| 73 |
} |
88 |
} |
| 74 |
|
89 |
|
| 75 |
- |
|
|