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