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>
This commit is contained in:

committed by
Junio C Hamano

parent
9ee6d63bab
commit
19fa8cd48c
@ -187,9 +187,6 @@ struct repository {
|
||||
};
|
||||
|
||||
extern struct repository *the_repository;
|
||||
#ifdef USE_THE_INDEX_VARIABLE
|
||||
extern struct index_state the_index;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define a custom repository layout. Any field can be NULL, which
|
||||
|
Reference in New Issue
Block a user