Commit a35341a
dir.c: refactor is_path_excluded()
In a similar way to the previous commit, this extracts a new helper
function last_exclude_matching_path() which return the last
exclude_list element which matched, or NULL if no match was found.
is_path_excluded() becomes a wrapper around this, and just returns 0
or 1 depending on whether any matching exclude_list element was found.
This allows callers to find out _why_ a given path was excluded,
rather than just whether it was or not, paving the way for a new git
sub-command which allows users to test their exclude lists from the
command line.
Signed-off-by: Adam Spiers <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent f4cd69a commit a35341a
2 files changed
+41
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| 712 | + | |
712 | 713 | | |
713 | 714 | | |
714 | 715 | | |
| |||
718 | 719 | | |
719 | 720 | | |
720 | 721 | | |
721 | | - | |
722 | | - | |
723 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
727 | 729 | | |
728 | | - | |
729 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
730 | 733 | | |
731 | 734 | | |
732 | 735 | | |
| 736 | + | |
733 | 737 | | |
734 | 738 | | |
735 | 739 | | |
| |||
739 | 743 | | |
740 | 744 | | |
741 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
742 | 752 | | |
743 | 753 | | |
744 | 754 | | |
745 | 755 | | |
746 | | - | |
| 756 | + | |
747 | 757 | | |
748 | 758 | | |
749 | 759 | | |
750 | 760 | | |
751 | 761 | | |
752 | 762 | | |
753 | 763 | | |
754 | | - | |
755 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
756 | 770 | | |
757 | 771 | | |
758 | 772 | | |
759 | 773 | | |
760 | 774 | | |
761 | 775 | | |
762 | 776 | | |
763 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
764 | 793 | | |
765 | 794 | | |
766 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
0 commit comments