Message ID | 20190124082912.24401-1-pclouds@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | nd/the-index-final small update | expand |
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > This was noticed by Ramsay [1] and I almost forgot. > > [1] http://public-inbox.org/git/419519f9-1b48-93bb-eead-eacf6b383f70@ramsayjones.plus.com Not forgetting is good ;-) > diff --git a/repository.c b/repository.c > --- a/repository.c > +++ b/repository.c > +@@ > ++/* > ++ * not really _using_ the compat macros, just make sure the_index > ++ * declaration matches the definition in this file. > ++ */ > ++#define USE_THE_INDEX_COMPATIBILITY_MACROS Hmph, that's an interesting trick. Thanks, will replace. > + #include "cache.h" > + #include "repository.h" > + #include "object-store.h" > @@ > /* The main repository */ > static struct repository the_repo;
This was noticed by Ramsay [1] and I almost forgot. [1] http://public-inbox.org/git/419519f9-1b48-93bb-eead-eacf6b383f70@ramsayjones.plus.com Range-diff: 1: 4478671442 ! 1: 971d2839ab cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch @@ -2,12 +2,11 @@ cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch - >From now on, by default index compat macros are off because they could + From now on, by default index compat macros are off because they could hide the_index dependency. Only those in builtin can use it (and even so should be avoided if possible). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> - Signed-off-by: Junio C Hamano <gitster@pobox.com> diff --git a/attr.c b/attr.c --- a/attr.c @@ -590,6 +589,15 @@ diff --git a/repository.c b/repository.c --- a/repository.c +++ b/repository.c +@@ ++/* ++ * not really _using_ the compat macros, just make sure the_index ++ * declaration matches the definition in this file. ++ */ ++#define USE_THE_INDEX_COMPATIBILITY_MACROS + #include "cache.h" + #include "repository.h" + #include "object-store.h" @@ /* The main repository */ static struct repository the_repo;