Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-04 Thread Duy Nguyen
On Sun, Nov 4, 2018 at 7:27 AM Eric Sunshine wrote: > > On Sat, Nov 3, 2018 at 8:25 PM Eric Sunshine wrote: > > On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy > > wrote: > > > +test_expect_success 't_e_i() exclude case #8' ' > > > + git init case8 && > > > + ( > > > +

Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-04 Thread Eric Sunshine
On Sat, Nov 3, 2018 at 8:25 PM Eric Sunshine wrote: > On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy > wrote: > > +test_expect_success 't_e_i() exclude case #8' ' > > + git init case8 && > > + ( > > + cd case8 && > > + echo file >file1 && > > +

Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-03 Thread Eric Sunshine
On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy wrote: > Rules 8 and 18 are now updated to be less eager. We conclude that the > current entry is positively matched and included. But we say nothing > about remaining entries. tree_entry_interesting() will be called again > for those entries

[PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-03 Thread Nguyễn Thái Ngọc Duy
tree_entry_interesting() is used for matching pathspec on a tree. The interesting thing about this function is that, because the tree entries are known to be sorted, this function can return more than just "yes, matched" and "no, not matched". It can also say "yes, this entry is matched and so is