aboutsummaryrefslogtreecommitdiff
path: root/cache-tree.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-02-22 14:55:44 -0800
committerJunio C Hamano <gitster@pobox.com>2023-02-22 14:55:44 -0800
commit24fb150dcd6b18b6d14ed14a02c6a17c33f0d443 (patch)
treece6f4b23b7d5344b77ad34528256f00e9ede5855 /cache-tree.h
parent5fc6d00b65c0a946cccef3e3ed056830c8ea23fd (diff)
parentdfd0a89374c6eba332dfa3f5670a29eaf96efa3b (diff)
downloadgit-24fb150dcd6b18b6d14ed14a02c6a17c33f0d443.tar.xz
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-tree.h')
-rw-r--r--cache-tree.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/cache-tree.h b/cache-tree.h
index 8efeccebfc..bd97caa07b 100644
--- a/cache-tree.h
+++ b/cache-tree.h
@@ -53,19 +53,4 @@ int write_index_as_tree(struct object_id *oid, struct index_state *index_state,
void prime_cache_tree(struct repository *, struct index_state *, struct tree *);
int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info);
-
-#ifdef USE_THE_INDEX_COMPATIBILITY_MACROS
-static inline int write_cache_as_tree(struct object_id *oid, int flags, const char *prefix)
-{
- return write_index_as_tree(oid, &the_index, get_index_file(), flags, prefix);
-}
-
-static inline int update_main_cache_tree(int flags)
-{
- if (!the_index.cache_tree)
- the_index.cache_tree = cache_tree();
- return cache_tree_update(&the_index, flags);
-}
-#endif
-
#endif