Re: [PATCH 1/1] ref-filter.c: find disjoint pattern prefixes

2019-07-01 Thread Taylor Blau
Hi Jacob, On Thu, Jun 27, 2019 at 04:21:57PM -0700, Jacob Keller wrote: > On Wed, Jun 26, 2019 at 3:44 PM Taylor Blau wrote: > > > > Ok, now I've got some time to look at the code itself. > > > ref-filter.c| 89 + > > t/t6300-for-each-ref.sh |

Re: [PATCH 1/1] ref-filter.c: find disjoint pattern prefixes

2019-07-01 Thread Taylor Blau
Hi Jacob, On Wed, Jun 26, 2019 at 05:37:42PM -0700, Jacob Keller wrote: > [ ... ] > > > Instead, we want to partition the patterns into disjoint sets, where we > > know that no ref will be matched by any two patterns in different sets. > > In the above, these are: > > > > - {'refs/heads/a/*', 'r

Re: [PATCH 1/1] ref-filter.c: find disjoint pattern prefixes

2019-06-27 Thread Jacob Keller
On Wed, Jun 26, 2019 at 3:44 PM Taylor Blau wrote: > Ok, now I've got some time to look at the code itself. > ref-filter.c| 89 + > t/t6300-for-each-ref.sh | 26 > 2 files changed, 89 insertions(+), 26 deletions(-) > > diff --git

Re: [PATCH 1/1] ref-filter.c: find disjoint pattern prefixes

2019-06-26 Thread Jacob Keller
On Wed, Jun 26, 2019 at 3:44 PM Taylor Blau wrote: > > Since cfe004a5a9 (ref-filter: limit traversal to prefix, 2017-05-22), > the ref-filter code has sought to limit the traversals to a prefix of > the given patterns. > > That code stopped short of handling more than one pattern, because it > mea

[PATCH 1/1] ref-filter.c: find disjoint pattern prefixes

2019-06-26 Thread Taylor Blau
Since cfe004a5a9 (ref-filter: limit traversal to prefix, 2017-05-22), the ref-filter code has sought to limit the traversals to a prefix of the given patterns. That code stopped short of handling more than one pattern, because it means invoking 'for_each_ref_in' multiple times. If we're not carefu