We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 049f95c + 39bc571 commit 238560eCopy full SHA for 238560e
spec_add_patch
@@ -138,8 +138,16 @@ for my $diffname (keys %diffs) {
138
my $striplevel = "";
139
open(P, '<', $diffname) or die "$diffname: $!\n";
140
while(<P>) {
141
- $striplevel = " -p1" if (m/^--- a/ or m/^--- [^\/]+-\d+\./);
142
- last if (/^--- /);
+ # Check if either the --- filename starts with 'a/' or the +++
+ # filename starts with 'b/', or either starts with a package
143
+ # name/version prefix. We have to check for either, because either
144
+ # of them could be /dev/null if a file is being added or
145
+ # deleted.
146
+ $striplevel = " -p1"
147
+ if m,^--- a/, or
148
+ m,^\+\+\+ b/, or
149
+ m,^(---|\+\+\+) [^/]+-\d+\.,;
150
+ last if (/^@@ -\d/);
151
152
}
153
close(P);
0 commit comments