On 13/06/2024 19:48, Junio C Hamano wrote: > Junio C Hamano <gitster@xxxxxxxxx> writes: > >> Patrick Steinhardt <ps@xxxxxx> writes: >> >>> this is the second version of my patch series that introduce a new >>> `USE_THE_REPOSITORY_VARIABLE` macro. If undefined, then declarations >>> like `the_repository`, `the_hash_algo` and a subset of functions that >>> implicitly depend on either of these are hidden away. >> >> ;-) > > Two things. > > (1) This stupid change was needed to please "make sparse", or we'd > get this: > > repository.c:21:19: error: symbol 'the_repository' was not declared. Should it be static? > gmake: *** [Makefile:3259: repository.sp] Error 1 > > repository.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git c/repository.c w/repository.c > index 95d10cc4a0..22ef85b0b3 100644 > --- c/repository.c > +++ w/repository.c > @@ -18,6 +18,8 @@ > > /* The main repository */ > static struct repository the_repo; > + > +extern struct repository *the_repository; > struct repository *the_repository = &the_repo; > Hmm, odd; isn't the declaration of 'the_repository' from the "repository.h" header file visible at this point? puzzled. ATB, Ramsay Jones