Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-05 Thread Brandon Williams
On 05/05, Junio C Hamano wrote: > Jonathan Nieder writes: > > > That is, one way to do what this series attempts would be the > > following: > > > > 1. rename variables that shadow the_index. > > No question about this one. It is a good thing to do. > > > 2. add

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-05 Thread Junio C Hamano
Jonathan Nieder writes: > That is, one way to do what this series attempts would be the > following: > > 1. rename variables that shadow the_index. No question about this one. It is a good thing to do. > 2. add coccinelle patches (or one coccinelle patch) to >

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-05 Thread Brandon Williams
On 05/05, Johannes Schindelin wrote: > Hi Stefan & Junio, > > On Thu, 4 May 2017, Stefan Beller wrote: > > > So instead of a mechanical replacement, we'd rather want to > > see "the_index" not appearing at all outside of builtins, which > > implies two things: > > > > * If done properly we can

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-05 Thread Johannes Schindelin
Hi Stefan & Junio, On Thu, 4 May 2017, Stefan Beller wrote: > So instead of a mechanical replacement, we'd rather want to > see "the_index" not appearing at all outside of builtins, which > implies two things: > > * If done properly we can move the macros from cache.h to > e.g. builtin.h. That

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-04 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: > Duy Nguyen writes: >> I attempted the same thing once or twice in the past, had the same >> impression and dropped it. But I think it's good to get rid of cache_* >> macros, at least outside builtin/ directory. > > One thing that needs to be kept

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-04 Thread Stefan Beller
On Wed, May 3, 2017 at 7:48 PM, Junio C Hamano wrote: > Duy Nguyen writes: > In the long run we may want to drop the macros guarded by NO_THE_INDEX_COMPATIBILITY_MACROS. This converts a couple of them. >>> >>> Why? >> >> Well.. why did you add

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Brandon Williams
On 05/03, Samuel Lijin wrote: > On Wed, May 3, 2017 at 12:14 PM, Stefan Beller wrote: > > On Wed, May 3, 2017 at 4:31 AM, Samuel Lijin wrote: > >> > >> Just to throw out an example, I'm relatively new to the codebase (I've > >> been lurking on the mailing

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Brandon Williams
On 05/03, Junio C Hamano wrote: > Duy Nguyen writes: > > >>> In the long run we may want to drop the macros guarded by > >>> NO_THE_INDEX_COMPATIBILITY_MACROS. This converts a couple of them. > >> > >> Why? > > > > Well.. why did you add NO_THE_INDEX_COMP... in the first

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Junio C Hamano
Duy Nguyen writes: >>> In the long run we may want to drop the macros guarded by >>> NO_THE_INDEX_COMPATIBILITY_MACROS. This converts a couple of them. >> >> Why? > > Well.. why did you add NO_THE_INDEX_COMP... in the first place? ;-) j/k That was to mark the code that

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Samuel Lijin
On Wed, May 3, 2017 at 12:14 PM, Stefan Beller wrote: > On Wed, May 3, 2017 at 4:31 AM, Samuel Lijin wrote: >> >> Just to throw out an example, I'm relatively new to the codebase (I've >> been lurking on the mailing list for a few months now) and for a >>

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Stefan Beller
On Wed, May 3, 2017 at 4:31 AM, Samuel Lijin wrote: > On Tue, May 2, 2017 at 9:05 AM, Jeff Hostetler wrote: >> >> >> On 5/2/2017 12:17 AM, Stefan Beller wrote: >>> >>> On Mon, May 1, 2017 at 6:36 PM, Junio C Hamano wrote:

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Stefan Beller
On Wed, May 3, 2017 at 3:27 AM, Duy Nguyen wrote: > On Tue, May 2, 2017 at 8:36 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> This applies to origin/master. >>> >>> For better readability and understandability for newcomers

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Samuel Lijin
On Tue, May 2, 2017 at 9:05 AM, Jeff Hostetler wrote: > > > On 5/2/2017 12:17 AM, Stefan Beller wrote: >> >> On Mon, May 1, 2017 at 6:36 PM, Junio C Hamano wrote: >>> >>> Stefan Beller writes: >>> This applies to origin/master.

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-03 Thread Duy Nguyen
On Tue, May 2, 2017 at 8:36 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> This applies to origin/master. >> >> For better readability and understandability for newcomers it is a good idea >> to not offer 2 APIs doing the same thing with on being

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-02 Thread Stefan Beller
On Tue, May 2, 2017 at 8:35 AM, Jeff Hostetler wrote: > You may also want to look at unpack-trees.c : mark_new_skip_worktree(). > It has a local variable named "the_index" in the argument list. > You may want to rename this to avoid confusion. Thanks for bringing this up.

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-02 Thread Jeff Hostetler
On 5/1/2017 3:07 PM, Stefan Beller wrote: This applies to origin/master. For better readability and understandability for newcomers it is a good idea to not offer 2 APIs doing the same thing with on being the #define of the other. In the long run we may want to drop the macros guarded by

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-02 Thread Jeff Hostetler
On 5/2/2017 12:17 AM, Stefan Beller wrote: On Mon, May 1, 2017 at 6:36 PM, Junio C Hamano wrote: Stefan Beller writes: This applies to origin/master. For better readability and understandability for newcomers it is a good idea to not offer 2 APIs

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 6:36 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> This applies to origin/master. >> >> For better readability and understandability for newcomers it is a good idea >> to not offer 2 APIs doing the same thing with on being

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-01 Thread Junio C Hamano
Stefan Beller writes: > This applies to origin/master. > > For better readability and understandability for newcomers it is a good idea > to not offer 2 APIs doing the same thing with on being the #define of the > other. > > In the long run we may want to drop the macros

[PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-01 Thread Stefan Beller
This applies to origin/master. For better readability and understandability for newcomers it is a good idea to not offer 2 APIs doing the same thing with on being the #define of the other. In the long run we may want to drop the macros guarded by NO_THE_INDEX_COMPATIBILITY_MACROS. This converts