Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-10 Thread Junio C Hamano
Michael Haggerty writes: > On 06/09/2016 06:14 PM, Junio C Hamano wrote: >> Michael Haggerty writes: >> > +static struct ref_store *main_ref_store = NULL; > + > +static struct ref_store *submodule_ref_stores = NULL; Let's let BSS take care of these initialization. >> [...]

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-10 Thread Michael Haggerty
On 06/10/2016 10:08 AM, Eric Sunshine wrote: > On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote: >> We want ref_stores to be polymorphic, so invent a base class of which >> files_ref_store is a derived class. For now there is a one-to-one >> relationship between ref_stores and submodules. >>

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-10 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote: > We want ref_stores to be polymorphic, so invent a base class of which > files_ref_store is a derived class. For now there is a one-to-one > relationship between ref_stores and submodules. > > Signed-off-by: Michael Haggerty > --- > diff --

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-09 Thread Michael Haggerty
On 06/09/2016 06:14 PM, Junio C Hamano wrote: > Michael Haggerty writes: > +static struct ref_store *main_ref_store = NULL; + +static struct ref_store *submodule_ref_stores = NULL; >>> >>> Let's let BSS take care of these initialization. > [...] > Lack of "= ..." is a clear-enough

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-09 Thread René Scharfe
Am 07.06.2016 um 18:31 schrieb Junio C Hamano: > This is a tangent, but your series that ends at 4aa2c475 (grep: -W: > don't extend context to trailing empty lines, 2016-05-28) does not > seem to have much effect when viewing the change to refs.c this > patch makes (it modifies a function in an ear

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-09 Thread Junio C Hamano
Michael Haggerty writes: >>> + >>> +static struct ref_store *main_ref_store = NULL; >>> + >>> +static struct ref_store *submodule_ref_stores = NULL; >> >> Let's let BSS take care of these initialization. > > I like the `= NULL` because it expresses "yes, I care about the initial > values of thes

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-09 Thread Michael Haggerty
On 06/07/2016 07:03 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> We want ref_stores to be polymorphic, so invent a base class of which >> files_ref_store is a derived class. For now there is a one-to-one >> relationship between ref_stores and submodules. > > The mention of "submodul

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > We want ref_stores to be polymorphic, so invent a base class of which > files_ref_store is a derived class. For now there is a one-to-one > relationship between ref_stores and submodules. The mention of "submodules" made me go "Huh?" but thinking about it for a second

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-07 Thread Junio C Hamano
This is a tangent, but your series that ends at 4aa2c475 (grep: -W: don't extend context to trailing empty lines, 2016-05-28) does not seem to have much effect when viewing the change to refs.c this patch makes (it modifies a function in an early part, and then adds bunch of new functions at the en

[PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-03 Thread Michael Haggerty
We want ref_stores to be polymorphic, so invent a base class of which files_ref_store is a derived class. For now there is a one-to-one relationship between ref_stores and submodules. Signed-off-by: Michael Haggerty --- refs.c | 91 ++ refs/files-backend.c