Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-18 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > >> >> All that said, I don't have a strong opinion on this. Both the 1-word >> approach (a pointer) and 24-word approach (embedding) are tolerable >> and there are reasons to prefer each. > > I do not care too much about 24-word wastage. If th

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Junio C Hamano
Jonathan Nieder writes: > > All that said, I don't have a strong opinion on this. Both the 1-word > approach (a pointer) and 24-word approach (embedding) are tolerable > and there are reasons to prefer each. I do not care too much about 24-word wastage. If this were not "a pointer pretending t

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: > Brandon Williams writes: >> Since it is a pointer then using a '#define' to replace 'the_index' >> (which is not a pointer) would be a little more challenging. > > The above is merely realizing another downside that stems from the > earlier design decision that the in

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Junio C Hamano
Brandon Williams writes: > For all intents and purposes the index struct that is stored in 'struct > repository' is an embedded instance, its just stored as a pointer > instead of being a direct part of the struct itself. The question really is this. In order to realize the intents and purposes

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Brandon Williams
On 07/11, Junio C Hamano wrote: > Brandon Williams writes: > > > Have the index state which is stored in 'the_repository' be a pointer to > > the in-core instead 'the_index'. This makes it easier to begin > > transitioning more parts of the code base to operate on a 'struct > > repository'. > >

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Brandon Williams
On 07/11, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > Have the index state which is stored in 'the_repository' be a pointer to > > the in-core instead 'the_index'. This makes it easier to begin > > transitioning more parts of the code base to operate on a 'struct > > repositor

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-11 Thread Junio C Hamano
Brandon Williams writes: > Have the index state which is stored in 'the_repository' be a pointer to > the in-core instead 'the_index'. This makes it easier to begin > transitioning more parts of the code base to operate on a 'struct > repository'. > > Signed-off-by: Brandon Williams > --- > se

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-11 Thread Stefan Beller
On Tue, Jul 11, 2017 at 5:00 PM, Jonathan Nieder wrote: > /* The main repository */ > -static struct repository the_repo; > +static struct repository the_repo = { .index = &the_index }; https://public-inbox.org/git/20170710070342.txmlwwq6gvjkw...@sigill.intra.peff.net/ specifically said we'd no

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-11 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Have the index state which is stored in 'the_repository' be a pointer to > the in-core instead 'the_index'. This makes it easier to begin > transitioning more parts of the code base to operate on a 'struct > repository'. > > Signed-off-by: Brandon Williams > --- >

[PATCH 2/3] setup: have the_repository use the_index

2017-07-11 Thread Brandon Williams
Have the index state which is stored in 'the_repository' be a pointer to the in-core instead 'the_index'. This makes it easier to begin transitioning more parts of the code base to operate on a 'struct repository'. Signed-off-by: Brandon Williams --- setup.c | 1 + 1 file changed, 1 insertion(+