Commit 09dbe1f
committed
sparse-checkout: properly match escaped characters
In cone mode, the sparse-checkout feature uses hashset containment
queries to match paths. Make this algorithm respect escaped asterisk
(*) and backslash (\) characters.
Create dup_and_filter_pattern() method to convert a pattern by
removing escape characters and dropping an optional "/*" at the end.
This method is available in dir.h as we will use it in
builtin/sparse-chekcout.c in a later change.
Signed-off-by: Derrick Stolee <[email protected]>1 parent 77a514f commit 09dbe1f
3 files changed
+47
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
633 | 659 | | |
634 | 660 | | |
635 | 661 | | |
| |||
698 | 724 | | |
699 | 725 | | |
700 | 726 | | |
701 | | - | |
702 | | - | |
| 727 | + | |
703 | 728 | | |
704 | 729 | | |
705 | 730 | | |
| |||
733 | 758 | | |
734 | 759 | | |
735 | 760 | | |
736 | | - | |
| 761 | + | |
737 | 762 | | |
738 | 763 | | |
739 | 764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
371 | 383 | | |
372 | 384 | | |
373 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
374 | 388 | | |
375 | | - | |
| 389 | + | |
376 | 390 | | |
377 | 391 | | |
378 | 392 | | |
0 commit comments