{builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"
commit666f53eb43f52216d03d579b91a2152ba7821773
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 19 Nov 2022 13:07:36 +0000 (19 14:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Nov 2022 03:06:15 +0000 (21 12:06 +0900)
treea74ba8c40a593cd94b0c0fa201352a57e18c4000
parent0ea414a14dac444c52f45d4d15c0f5318dddc4b1
{builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"

Split up the "USE_THE_INDEX_COMPATIBILITY_MACROS" into that setting
and a more narrow "USE_THE_INDEX_VARIABLE". In the case of these
built-ins we only need "the_index" variable, but not the compatibility
wrapper for functions we're not using.

Let's then have some users of "USE_THE_INDEX_COMPATIBILITY_MACROS" use
this more narrow and descriptive define.

For context: The USE_THE_INDEX_COMPATIBILITY_MACROS macro was added to
test-tool.h in f8adbec9fea (cache.h: flip
NO_THE_INDEX_COMPATIBILITY_MACROS switch, 2019-01-24).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c
builtin/difftool.c
builtin/merge-tree.c
builtin/pull.c
cache.h
repository.c