Git fork

repository.h: move declaration of the_index from cache.h

the_index is a global variable defined in repository.c; as such, its
declaration feels better suited living in repository.h rather than
cache.h. Move it.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Elijah Newren and committed by
Junio C Hamano
bc47f16d 750324dd

+4 -4
-4
cache.h
··· 312 void prefetch_cache_entries(const struct index_state *istate, 313 must_prefetch_predicate must_prefetch); 314 315 - #ifdef USE_THE_INDEX_VARIABLE 316 - extern struct index_state the_index; 317 - #endif 318 - 319 /* Initialize and use the cache information */ 320 struct lock_file; 321 int do_read_index(struct index_state *istate, const char *path,
··· 312 void prefetch_cache_entries(const struct index_state *istate, 313 must_prefetch_predicate must_prefetch); 314 315 /* Initialize and use the cache information */ 316 struct lock_file; 317 int do_read_index(struct index_state *istate, const char *path,
+3
repository.h
··· 170 }; 171 172 extern struct repository *the_repository; 173 174 /* 175 * Define a custom repository layout. Any field can be NULL, which
··· 170 }; 171 172 extern struct repository *the_repository; 173 + #ifdef USE_THE_INDEX_VARIABLE 174 + extern struct index_state the_index; 175 + #endif 176 177 /* 178 * Define a custom repository layout. Any field can be NULL, which
+1
t/helper/test-dump-split-index.c
··· 2 #include "test-tool.h" 3 #include "cache.h" 4 #include "hex.h" 5 #include "setup.h" 6 #include "split-index.h" 7 #include "ewah/ewok.h"
··· 2 #include "test-tool.h" 3 #include "cache.h" 4 #include "hex.h" 5 + #include "repository.h" 6 #include "setup.h" 7 #include "split-index.h" 8 #include "ewah/ewok.h"