Re: [PATCH 28/28] attr: convert to new threadsafe API

2016-10-11 Thread Junio C Hamano
Stefan Beller writes: >> You can have many different callsites (think: hits "git grep" finds) >> that call git_attr_check_initl() and they all may be asking for >> different set of attributes. As long as they are using different >> "check" instance to receive these sets of attributes, they are O

Re: [PATCH 28/28] attr: convert to new threadsafe API

2016-10-11 Thread Stefan Beller
On Tue, Oct 11, 2016 at 11:23 AM, Junio C Hamano wrote: > Stefan Beller writes: > >>> I find this description a bit confusing. At least the way I >>> envisioned was that when this piece of code is run by multiple >>> people at the same time, >>> >>> static struct git_attr_check *check =

Re: [PATCH 28/28] attr: convert to new threadsafe API

2016-10-11 Thread Junio C Hamano
Stefan Beller writes: >> I find this description a bit confusing. At least the way I >> envisioned was that when this piece of code is run by multiple >> people at the same time, >> >> static struct git_attr_check *check = NULL; >> git_attr_check_initl(&check, ...); >> >> we won'

Re: [PATCH 28/28] attr: convert to new threadsafe API

2016-10-11 Thread Junio C Hamano
Stefan Beller writes: > This revamps the API of the attr subsystem to be thread safe. > Before we had the question and its results in one struct type. > The typical usage of the API was > > static struct git_attr_check; I think you meant "*check" at the end, perhaps? > > if (!check) >

Re: [PATCH 28/28] attr: convert to new threadsafe API

2016-10-11 Thread Stefan Beller
On Tue, Oct 11, 2016 at 10:40 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> This revamps the API of the attr subsystem to be thread safe. >> Before we had the question and its results in one struct type. >> The typical usage of the API was >> >> static struct git_attr_check; > > I th

Re: [PATCH 28/28] attr: convert to new threadsafe API

2016-10-11 Thread Brandon Williams
On 10/10, Stefan Beller wrote: > be initalized once as that part will be read only after its initialized > initialisation, the answer may be different for each path. should this be the US spelling 'initialization'? -- Brandon Williams

[PATCH 28/28] attr: convert to new threadsafe API

2016-10-10 Thread Stefan Beller
This revamps the API of the attr subsystem to be thread safe. Before we had the question and its results in one struct type. The typical usage of the API was static struct git_attr_check; if (!check) check = git_attr_check_initl("text", NULL); git_check_attr(path, check);