]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/merge.c
cocci & cache.h: apply variable section of "pending" index-compatibility
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 19 Nov 2022 13:07:34 +0000 (14:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Nov 2022 03:06:15 +0000 (12:06 +0900)
commitdc594180d9e62438cb664c678f5e5bd229154c75
tree10b94b968ae39d1f78cdac0fdaa3238f744f5c41
parent031b2033e0b5c6276bbd93f276e1698f925fb498
cocci & cache.h: apply variable section of "pending" index-compatibility

Mostly apply the part of "index-compatibility.pending.cocci" that
renames the global variables like "active_nr", which are a shorthand
to referencing (in that case) a struct member as "the_index.cache_nr".

In doing so move more of "index-compatibility.pending.cocci" to
"index-compatibility.cocci".

In the case of "active_nr" we'd have a textual conflict with
"ab/various-leak-fixes" in "next"[1]. Let's exclude that specific case
while moving the rule over from "pending".

1. 407b94280f8 (commit: discard partial cache before (re-)reading it,
   2022-11-08)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 files changed:
builtin/add.c
builtin/checkout-index.c
builtin/checkout.c
builtin/commit.c
builtin/fsck.c
builtin/merge-index.c
builtin/merge.c
builtin/mv.c
builtin/read-tree.c
builtin/reset.c
builtin/rm.c
builtin/stash.c
builtin/submodule--helper.c
builtin/update-index.c
cache.h
contrib/coccinelle/index-compatibility.cocci
contrib/coccinelle/index-compatibility.pending.cocci
t/helper/test-dump-cache-tree.c
t/helper/test-scrap-cache-tree.c