cocci: add a index-compatibility.pending.cocci
commit0e6550a2c631e032c1c283398e50e9e654c171f0
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 19 Nov 2022 13:07:32 +0000 (19 14:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Nov 2022 03:06:15 +0000 (21 12:06 +0900)
tree0b82bdf6d1da58e7828a4b979eff0f85b267234f
parent9c5f3ee3b3a04182cc22630e9eb9fad95bd57fd7
cocci: add a index-compatibility.pending.cocci

Add a coccinelle rule which covers the rest of the macros guarded by
"USE_THE_INDEX_COMPATIBILITY_MACROS" cache.h. If the result of this
were applied it can be reduced down to just:

#ifdef USE_THE_INDEX_COMPATIBILITY_MACROS
extern struct index_state the_index;
#endif

But that patch is just under 2000 lines, so let's first add this as a
"pending", and then incrementally pick changes from it in subsequent
commits. In doing that we'll migrate rules from this
"index-compatibility.pending.cocci" to the "index-compatibility.cocci"
created in a preceding commit.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/index-compatibility.pending.cocci [new file with mode: 0644]