Skip to content

Commit c74e7b1

Browse files
avargitster
authored andcommitted
cache.h: remove unused "the_index" compat macros
The "active_alloc" macro added in 228e94f (Move index-related variables into a structure., 2007-04-01) has not been used since 4aab5b4 (Make read-cache.c "the_index" free., 2007-04-01). Let's remove it. The rest of these are likewise unused, so let's not keep them around. E.g. 12cd0bf (dir: stop using the index compatibility macros, 2017-05-05) is the last use of "cache_dir_exists". Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a078951 commit c74e7b1

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

cache.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ extern struct index_state the_index;
438438

439439
#define active_cache (the_index.cache)
440440
#define active_nr (the_index.cache_nr)
441-
#define active_alloc (the_index.cache_alloc)
442441
#define active_cache_changed (the_index.cache_changed)
443442
#define active_cache_tree (the_index.cache_tree)
444443

@@ -452,7 +451,6 @@ extern struct index_state the_index;
452451
#define cache_name_pos(name, namelen) index_name_pos(&the_index,(name),(namelen))
453452
#define add_cache_entry(ce, option) add_index_entry(&the_index, (ce), (option))
454453
#define rename_cache_entry_at(pos, new_name) rename_index_entry_at(&the_index, (pos), (new_name))
455-
#define remove_cache_entry_at(pos) remove_index_entry_at(&the_index, (pos))
456454
#define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
457455
#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags))
458456
#define add_file_to_cache(path, flags) add_file_to_index(&the_index, (path), (flags))
@@ -461,13 +459,10 @@ extern struct index_state the_index;
461459
#define refresh_and_write_cache(refresh_flags, write_flags, gentle) repo_refresh_and_write_index(the_repository, (refresh_flags), (write_flags), (gentle), NULL, NULL, NULL)
462460
#define ce_match_stat(ce, st, options) ie_match_stat(&the_index, (ce), (st), (options))
463461
#define ce_modified(ce, st, options) ie_modified(&the_index, (ce), (st), (options))
464-
#define cache_dir_exists(name, namelen) index_dir_exists(&the_index, (name), (namelen))
465462
#define cache_file_exists(name, namelen, igncase) index_file_exists(&the_index, (name), (namelen), (igncase))
466463
#define cache_name_is_other(name, namelen) index_name_is_other(&the_index, (name), (namelen))
467464
#define resolve_undo_clear() resolve_undo_clear_index(&the_index)
468465
#define unmerge_cache_entry_at(at) unmerge_index_entry_at(&the_index, at)
469-
#define unmerge_cache(pathspec) unmerge_index(&the_index, pathspec)
470-
#define read_blob_data_from_cache(path, sz) read_blob_data_from_index(&the_index, (path), (sz))
471466
#define hold_locked_index(lock_file, flags) repo_hold_locked_index(the_repository, (lock_file), (flags))
472467
#endif
473468

0 commit comments

Comments
 (0)