View | Details | Raw Unified | Return to bug 39114
Collapse All | Expand All

(-)a/misc/devel/auto_rebase.pl (-4 / +4 lines)
Lines 152-170 FILE: while ( my ( $ii, $file ) = each @modified_files ) { Link Here
152
        say BLUE sprintf "\t\tProcessing file %s... (%s/%s)", $file, $ii + 1, scalar @modified_files;
152
        say BLUE sprintf "\t\tProcessing file %s... (%s/%s)", $file, $ii + 1, scalar @modified_files;
153
153
154
        # Retrieve the content of the file from this commit
154
        # Retrieve the content of the file from this commit
155
        my @content = try {
155
        my $file_was_deleted = 0;
156
        my @content          = try {
156
            $git->RUN( "show", "$commit:$file" );
157
            $git->RUN( "show", "$commit:$file" );
157
        } catch {
158
        } catch {
158
            if ( $_->error =~ m{fatal: path '.*' exists on disk, but not in '$commit'} ) {
159
            if ( $_->error =~ m{fatal: path '.*' exists on disk, but not in '$commit'} ) {
159
                say BLUE "\t\t\tFile does not exist, removing...";
160
                say BLUE "\t\t\tFile does not exist, removing...";
160
                $git->rm($file);
161
                $file_was_deleted = 1;
161
            } else {
162
            } else {
162
                say RED "Something wrong happened when retrieving the file from the branch.";
163
                say RED "Something wrong happened when retrieving the file from the branch.";
163
                exit 2;
164
                exit 2;
164
            }
165
            }
165
        };
166
        };
166
167
167
        next unless @content;    # We removed the file
168
        next if !@content || $file_was_deleted;    # We removed the file
168
169
169
        my $parent_directory = dirname($file);
170
        my $parent_directory = dirname($file);
170
        unless ( -f $parent_directory ) {
171
        unless ( -f $parent_directory ) {
171
- 

Return to bug 39114