Re: [PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-27 Thread Junio C Hamano
Patrick Steinhardt writes: >> This is probably a useful improvement. >> >> Having said that, when I mentioned "glob", I meant to also support >> something like this: >> >> https://www[1-4].ibm.com/ > > The problem with additional extended syntax like proposed

Re: [PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-26 Thread Patrick Steinhardt
On Thu, Jan 26, 2017 at 12:43:31PM -0800, Junio C Hamano wrote: > Patrick Steinhardt writes: > > > The URL matching function computes for two URLs whether they match not. > > The match is performed by splitting up the URL into different parts and > > then doing an

Re: [PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-26 Thread Junio C Hamano
Junio C Hamano writes: > Junio C Hamano writes: > >> +while (url_len && pat_len) { >> +const char *url_next = end_of_token(url, '.', url_len); >> +const char *pat_next = end_of_token(pat, '.', pat_len); >> + ... >> } >> >>

Re: [PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-26 Thread Junio C Hamano
Junio C Hamano writes: > + while (url_len && pat_len) { > + const char *url_next = end_of_token(url, '.', url_len); > + const char *pat_next = end_of_token(pat, '.', pat_len); > + ... > } > > + return 1; Embarrassing. The last one must

Re: [PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-26 Thread Junio C Hamano
Patrick Steinhardt writes: > The URL matching function computes for two URLs whether they match not. > The match is performed by splitting up the URL into different parts and > then doing an exact comparison with the to-be-matched URL. > > The main user of `urlmatch`

[PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-25 Thread Patrick Steinhardt
The URL matching function computes for two URLs whether they match not. The match is performed by splitting up the URL into different parts and then doing an exact comparison with the to-be-matched URL. The main user of `urlmatch` is the configuration subsystem. It allows to set certain