Commit 05f9986
committed
attr_file: convert to use
Upstream git has converted to use `wildmatch` instead of
`fnmatch`. Convert our gitattributes logic to use `wildmatch` as
the last user of `fnmatch`. Please, don't expect I know what I'm
doing here: the fnmatch parser is one of the most fun things to
play around with as it has a sh*tload of weird cases. In all
honesty, I'm simply relying on our tests that are by now rather
comprehensive in that area.
The conversion actually fixes compatibility with how git.git
parser "**" patterns when the given path does not contain any
directory separators. Previously, a pattern "**.foo" erroneously
wouldn't match a file "x.foo", while git.git would match.
Remove the new-unused LEADINGDIR/NOLEADINGDIR flags for
`git_attr_fnmatch`.wildmatch
1 parent 5811e3b commit 05f9986
File tree
5 files changed
+30
-31
lines changed- src
- tests/ignore
5 files changed
+30
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | | - | |
407 | | - | |
| 405 | + | |
408 | 406 | | |
409 | 407 | | |
410 | 408 | | |
411 | | - | |
| 409 | + | |
412 | 410 | | |
413 | 411 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | 412 | | |
418 | 413 | | |
419 | 414 | | |
| |||
428 | 423 | | |
429 | 424 | | |
430 | 425 | | |
431 | | - | |
432 | | - | |
433 | 426 | | |
434 | 427 | | |
435 | 428 | | |
| |||
438 | 431 | | |
439 | 432 | | |
440 | 433 | | |
441 | | - | |
| 434 | + | |
442 | 435 | | |
443 | 436 | | |
444 | | - | |
| 437 | + | |
445 | 438 | | |
446 | 439 | | |
447 | 440 | | |
| |||
659 | 652 | | |
660 | 653 | | |
661 | 654 | | |
662 | | - | |
663 | | - | |
664 | 655 | | |
665 | 656 | | |
666 | 657 | | |
| |||
716 | 707 | | |
717 | 708 | | |
718 | 709 | | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | 710 | | |
728 | 711 | | |
729 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 196 | + | |
199 | 197 | | |
200 | 198 | | |
201 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
233 | 255 | | |
234 | 256 | | |
235 | 257 | | |
| |||
0 commit comments