git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Taylor Blau" <me@ttaylorr.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Phillip Wood" <phillip.wood123@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2 01/11] cache.h: remove unused "the_index" compat macros
Date: Sat, 19 Nov 2022 14:07:28 +0100	[thread overview]
Message-ID: <patch-v2-01.11-3ddae1f5886-20221119T125550Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-v2-00.11-00000000000-20221119T125550Z-avarab@gmail.com>

The "active_alloc" macro added in 228e94f9357 (Move index-related
variables into a structure., 2007-04-01) has not been used since
4aab5b46f44 (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. 12cd0bf9b02 (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 <avarab@gmail.com>
---
 cache.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/cache.h b/cache.h
index 26ed03bd6de..29bb0ad2b41 100644
--- a/cache.h
+++ b/cache.h
@@ -438,7 +438,6 @@ extern struct index_state the_index;
 
 #define active_cache (the_index.cache)
 #define active_nr (the_index.cache_nr)
-#define active_alloc (the_index.cache_alloc)
 #define active_cache_changed (the_index.cache_changed)
 #define active_cache_tree (the_index.cache_tree)
 
@@ -452,7 +451,6 @@ extern struct index_state the_index;
 #define cache_name_pos(name, namelen) index_name_pos(&the_index,(name),(namelen))
 #define add_cache_entry(ce, option) add_index_entry(&the_index, (ce), (option))
 #define rename_cache_entry_at(pos, new_name) rename_index_entry_at(&the_index, (pos), (new_name))
-#define remove_cache_entry_at(pos) remove_index_entry_at(&the_index, (pos))
 #define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
 #define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags))
 #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;
 #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)
 #define ce_match_stat(ce, st, options) ie_match_stat(&the_index, (ce), (st), (options))
 #define ce_modified(ce, st, options) ie_modified(&the_index, (ce), (st), (options))
-#define cache_dir_exists(name, namelen) index_dir_exists(&the_index, (name), (namelen))
 #define cache_file_exists(name, namelen, igncase) index_file_exists(&the_index, (name), (namelen), (igncase))
 #define cache_name_is_other(name, namelen) index_name_is_other(&the_index, (name), (namelen))
 #define resolve_undo_clear() resolve_undo_clear_index(&the_index)
 #define unmerge_cache_entry_at(at) unmerge_index_entry_at(&the_index, at)
-#define unmerge_cache(pathspec) unmerge_index(&the_index, pathspec)
-#define read_blob_data_from_cache(path, sz) read_blob_data_from_index(&the_index, (path), (sz))
 #define hold_locked_index(lock_file, flags) repo_hold_locked_index(the_repository, (lock_file), (flags))
 #endif
 
-- 
2.38.0.1509.g9445af83948


  reply	other threads:[~2022-11-19 13:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 11:30 [PATCH 00/12] tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROS Ævar Arnfjörð Bjarmason
2022-11-18 11:30 ` [PATCH 01/12] cache.h: remove unused "the_index" compat macros Ævar Arnfjörð Bjarmason
2022-11-18 11:30 ` [PATCH 02/12] builtin/{grep,log}.: don't define "USE_THE_INDEX_COMPATIBILITY_MACROS" Ævar Arnfjörð Bjarmason
2022-11-18 11:30 ` [PATCH 03/12] cocci & cache.h: remove rarely used "the_index" compat macros Ævar Arnfjörð Bjarmason
2022-11-18 11:30 ` [PATCH 04/12] read-cache API & users: make discard_index() return void Ævar Arnfjörð Bjarmason
2022-11-18 11:30 ` [PATCH 05/12] cocci: add a index-compatibility.pending.cocci Ævar Arnfjörð Bjarmason
2022-11-18 11:31 ` [PATCH 06/12] cocci & cache.h: apply a selection of "pending" index-compatibility Ævar Arnfjörð Bjarmason
2022-11-18 11:31 ` [PATCH 07/12] cocci & cache.h: apply variable section " Ævar Arnfjörð Bjarmason
2022-11-18 11:31 ` [PATCH 08/12] cocci: apply "pending" index-compatibility to "t/helper/*.c" Ævar Arnfjörð Bjarmason
2022-11-18 11:31 ` [PATCH 09/12] {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE" Ævar Arnfjörð Bjarmason
2022-11-18 18:41   ` Taylor Blau
2022-11-18 11:31 ` [PATCH 10/12] cache.h & test-tool.h: " Ævar Arnfjörð Bjarmason
2022-11-18 18:41   ` Taylor Blau
2022-11-18 11:31 ` [PATCH 11/12] cocci: apply "pending" index-compatibility to some "builtin/*.c" Ævar Arnfjörð Bjarmason
2022-11-18 11:31 ` [PATCH 12/12] builtin/*: remove or amend "USE_THE_INDEX_COMPATIBILITY_MACROS" Ævar Arnfjörð Bjarmason
2022-11-18 18:42   ` Taylor Blau
2022-11-18 19:27     ` Ævar Arnfjörð Bjarmason
2022-11-18 23:04       ` Taylor Blau
2022-11-18 12:13 ` [PATCH 00/12] tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROS Phillip Wood
2022-11-18 12:21   ` Ævar Arnfjörð Bjarmason
2022-11-19 13:07 ` [PATCH v2 00/11] " Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` Ævar Arnfjörð Bjarmason [this message]
2022-11-19 13:07   ` [PATCH v2 02/11] builtin/{grep,log}.: don't define "USE_THE_INDEX_COMPATIBILITY_MACROS" Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 03/11] cocci & cache.h: remove rarely used "the_index" compat macros Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 04/11] read-cache API & users: make discard_index() return void Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 05/11] cocci: add a index-compatibility.pending.cocci Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 06/11] cocci & cache.h: apply a selection of "pending" index-compatibility Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 07/11] cocci & cache.h: apply variable section " Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 08/11] cocci: apply "pending" index-compatibility to "t/helper/*.c" Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 09/11] {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE" Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 10/11] cache.h & test-tool.h: " Ævar Arnfjörð Bjarmason
2022-11-19 13:07   ` [PATCH v2 11/11] cocci: apply "pending" index-compatibility to some "builtin/*.c" Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-v2-01.11-3ddae1f5886-20221119T125550Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=phillip.wood123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).