diff --git a/src/vfs/extfs/helpers/patchfs.in b/src/vfs/extfs/helpers/patchfs.in
index 19667ab..908c9f3 100644
a
|
b
|
my $fileutil = 'file -b'; |
23 | 23 | my $parsedates = eval 'require Date::Parse'; |
24 | 24 | |
25 | 25 | # regular expressions |
26 | | my $unified_header=qr/^--- .*\n\+\+\+ .*\n$/; |
27 | | my $unified_extract=qr/^--- ([^\s]+).*\n\+\+\+ ([^\s]+)\s*([^\t\n]*)/; |
| 26 | my $unified_header=qr/^--- .*\t.*\n\+\+\+ .*\t.*\n$/; |
| 27 | my $unified_extract=qr/^--- ([^\t]+).*\n\+\+\+ ([^\t]+)\s*(.*)\n/; |
| 28 | my $unified_header2=qr/^--- .*\n\+\+\+ .*\n$/; |
| 29 | my $unified_extract2=qr/^--- ([^\s]+).*\n\+\+\+ ([^\s]+)\s*(.*)\n/; |
28 | 30 | my $unified_contents=qr/^([+\-\\ \n]|@@ .* @@)/; |
29 | 31 | my $unified_hunk=qr/@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*\n/; |
30 | 32 | |
31 | | my $context_header=qr/^\*\*\* .*\n--- .*\n$/; |
32 | | my $context_extract=qr/^\*\*\* ([^\s]+).*\n--- ([^\s]+)\s*([^\t\n]*)/; |
| 33 | my $context_header=qr/^\*\*\* .*\t.*\n--- .*\t.*\n$/; |
| 34 | my $context_extract=qr/^\*\*\* ([^\t]+).*\n--- ([^\t]+)\s*(.*)\n/; |
| 35 | my $context_header2=qr/^\*\*\* .*\n--- .*\n$/; |
| 36 | my $context_extract2=qr/^\*\*\* ([^\s]+).*\n--- ([^\s]+)\s*(.*)\n/; |
33 | 37 | my $context_contents=qr/^([!+\-\\ \n]|-{3} .* -{4}|\*{3} .* \*{4}|\*{15})/; |
34 | 38 | |
35 | 39 | my $ls_extract_id=qr/^[^\s]+\s+[^\s]+\s+([^\s]+)\s+([^\s]+)/; |
… |
… |
sub parse($$$$) |
201 | 205 | if($unified) { |
202 | 206 | if(/$unified_header/o) { |
203 | 207 | ($fsrc,$fdst,$time) = /$unified_extract/o; |
| 208 | } elsif(/$unified_header2/o) { |
| 209 | ($fsrc,$fdst,$time) = /$unified_extract2/o; |
204 | 210 | } else { |
205 | 211 | error "Can't parse unified diff header"; |
206 | 212 | } |
207 | 213 | } elsif($context) { |
208 | 214 | if(/$context_header/o) { |
209 | 215 | ($fsrc,$fdst,$time) = /$context_extract/o; |
| 216 | } elsif(/$context_header2/o) { |
| 217 | ($fsrc,$fdst,$time) = /$context_extract2/o; |
210 | 218 | } else { |
211 | 219 | error "Can't parse context diff header"; |
212 | 220 | } |