Commit fc8e7ee
committed
fix: over-permissive regex for added/deleted file meta header
The previous pattern uselessly included `.*`, unlike all the other
patterns, and so would erroneously match on actual diff content lines.
Noticed this because the line itself was filtered out of diffs in this
codebase.
This also tightens the pattern since the file mode will always be six
octal (0-7) chars; and in the git codebase the format string is:
"%s%snew file mode %06o%s\n"1 parent 02c8c00 commit fc8e7ee
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
0 commit comments