repository: drop `the_index` variable
commit19fa8cd48c106ded717eeaf145b45e995318f3fe
authorPatrick Steinhardt <ps@pks.im>
Thu, 18 Apr 2024 12:14:29 +0000 (18 14:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Apr 2024 19:30:42 +0000 (18 12:30 -0700)
treed72903d393216af0db3529a8f5f2a1daef954416
parent9ee6d63babb8beaace8c654df6c65ff61f3697b8
repository: drop `the_index` variable

All users of `the_index` have been converted to use either a custom
`struct index_state *` or the index provided by `the_repository`. We can
thus drop the globally-accessible declaration of this variable. In fact,
we can go further than that and drop `the_index` completely now and have
it be allocated dynamically in `initialize_repository()` as all the
other data structures in it are.

This concludes the quest to make Git `the_index` free, which has started
with 4aab5b46f4 (Make read-cache.c "the_index" free., 2007-04-01).

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
repository.c
repository.h