The pattern to extract the file for diagnostics should a patch not apply was
failing to match (and generating a legitimate used of uninitialized value
warning) for the case where the patch was specified as --- b/ +++ a/
The pattern was only expecting --- a/ +++ b/
my ($patch, $what, $files) = @_;
$what = 'patch' unless defined $what;
unless (defined $files) {
- $patch =~ m!^--- a/(\S+)\n\+\+\+ b/\1!sm;
+ $patch =~ m!^--- [ab]/(\S+)\n\+\+\+ [ba]/\1!sm;
$files = " $1";
}
my $patch_to_use = placate_patch_prog($patch);