bisect-runner.pl should match patches with directory 'b' before 'a'.
authorNicholas Clark <nick@ccl4.org>
Tue, 26 Feb 2013 19:50:46 +0000 (20:50 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 May 2013 07:19:30 +0000 (09:19 +0200)
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/

Porting/bisect-runner.pl

index be88d59..101b036 100755 (executable)
@@ -967,7 +967,7 @@ sub apply_patch {
     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);