Bugzilla – Attachment 177842 Details for
Bug 38664
Tidy the whole codebase
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38664: The auto-rebase script - Create parent directory if missing
Bug-38664-The-auto-rebase-script---Create-parent-d.patch (text/plain), 1.29 KB, created by
Jonathan Druart
on 2025-02-12 11:01:43 UTC
(
hide
)
Description:
Bug 38664: The auto-rebase script - Create parent directory if missing
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-02-12 11:01:43 UTC
Size:
1.29 KB
patch
obsolete
>From ba396fd5f280c99aa18901892a125448a2e99957 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 12 Feb 2025 12:01:25 +0100 >Subject: [PATCH] Bug 38664: The auto-rebase script - Create parent directory > if missing > >--- > misc/devel/auto_rebase.pl | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/misc/devel/auto_rebase.pl b/misc/devel/auto_rebase.pl >index ede46b931d4..3dd01c4d253 100755 >--- a/misc/devel/auto_rebase.pl >+++ b/misc/devel/auto_rebase.pl >@@ -2,9 +2,11 @@ > use Modern::Perl; > use Term::ANSIColor qw(:constants); > use Git::Wrapper; >-use File::Slurp qw( write_file ); >-use File::Temp qw( tempfile ); >-use List::Util qw( first ); >+use File::Slurp qw( write_file ); >+use File::Temp qw( tempfile ); >+use File::Basename qw(dirname); >+use File::Path qw(make_path); >+use List::Util qw( first ); > use Getopt::Long; > use Pod::Usage; > use Try::Tiny; >@@ -164,6 +166,10 @@ FILE: while ( my ( $ii, $file ) = each @modified_files ) { > > next unless @content; # We removed the file > >+ my $parent_directory = dirname($file); >+ unless ( -f $parent_directory ) { >+ make_path($parent_directory); >+ } > write_file( $file, join "\n", @content ); > > # Tidy the file >-- >2.34.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 38664
:
175488
|
175664
|
177755
|
177796
|
177797
|
177798
|
177799
|
177800
|
177801
|
177802
|
177813
|
177825
|
177826
|
177827
| 177842 |
177957
|
177958