diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-23 01:55:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-23 01:55:44 +0300 |
commit | 24fb150dcd6b18b6d14ed14a02c6a17c33f0d443 (patch) | |
tree | ce6f4b23b7d5344b77ad34528256f00e9ede5855 /cache.h | |
parent | 5fc6d00b65c0a946cccef3e3ed056830c8ea23fd (diff) | |
parent | dfd0a89374c6eba332dfa3f5670a29eaf96efa3b (diff) |
Merge branch 'ab/the-index-compatibility'
Remove more remaining uses of macros that relies on the_index
singleton instance without explicitly spelling it out.
* ab/the-index-compatibility:
cocci & cache.h: remove "USE_THE_INDEX_COMPATIBILITY_MACROS"
cache-tree API: remove redundant update_main_cache_tree()
cocci & cache-tree.h: migrate "write_cache_as_tree" to "*_index_*"
cocci & cache.h: apply pending "index_cache_pos" rule
cocci & cache.h: fully apply "active_nr" part of index-compatibility
builtin/rm.c: use narrower "USE_THE_INDEX_VARIABLE"
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -449,18 +449,8 @@ typedef int (*must_prefetch_predicate)(const struct cache_entry *); void prefetch_cache_entries(const struct index_state *istate, must_prefetch_predicate must_prefetch); -#if defined(USE_THE_INDEX_COMPATIBILITY_MACROS) || defined(USE_THE_INDEX_VARIABLE) +#ifdef USE_THE_INDEX_VARIABLE extern struct index_state the_index; - -#ifndef USE_THE_INDEX_VARIABLE -#ifdef USE_THE_INDEX_COMPATIBILITY_MACROS -#define active_nr (the_index.cache_nr) - -#define read_cache() repo_read_index(the_repository) -#define discard_cache() discard_index(&the_index) -#define cache_name_pos(name, namelen) index_name_pos(&the_index,(name),(namelen)) -#endif -#endif #endif #define TYPE_BITS 3 |