cocci: add missing "the_repository" macros to "pending"

In the case of diff.h, rerere.h and revision.h the macros were added in [1], [2] and [3] when "the_repository.pending.cocci" didn't exist. None of the subsequently added migration rules covered them. Let's add those missing rules. In the case of macros in "cache.h", "commit.h", "packfile.h", "promisor-remote.h" and "refs.h" those aren't guarded by "NO_THE_REPOSITORY_COMPATIBILITY_MACROS", but they're also macros that add "the_repository" as the first argument, so we should migrate away from them. 1. 2abf3503854 (revision.c: remove implicit dependency on the_index, 2018-09-21) 2. e6757652350 (diff.c: remove implicit dependency on the_index, 2018-09-21) 3. 35843b1123e (rerere.c: remove implicit dependency on the_index, 2018-09-21) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Mar 28, 2023 at 15:58 UTC 7258e892d2c0f7a615562656e9978f39f610c056
1 file changed +70
contrib/coccinelle/the_repository.pending.cocci
+70
@@ -5,7 +5,44 @@
5 @@
6 @@
7 (
8 +// cache.h
9 +- get_oid
10 ++ repo_get_oid
11 +|
12 +- get_oid_commit
13 ++ repo_get_oid_commit
14 +|
15 +- get_oid_committish
16 ++ repo_get_oid_committish
17 +|
18 +- get_oid_tree
19 ++ repo_get_oid_tree
20 +|
21 +- get_oid_treeish
22 ++ repo_get_oid_treeish
23 +|
24 +- get_oid_blob
25 ++ repo_get_oid_blob
26 +|
27 +- get_oid_mb
28 ++ repo_get_oid_mb
29 +|
30 +- find_unique_abbrev
31 ++ repo_find_unique_abbrev
32 +|
33 +- find_unique_abbrev_r
34 ++ repo_find_unique_abbrev_r
35 +|
36 +- for_each_abbrev
37 ++ repo_for_each_abbrev
38 +|
39 +- interpret_branch_name
40 ++ repo_interpret_branch_name
41 +|
42 +- peel_to_type
43 ++ repo_peel_to_type
44 // commit-reach.h
45 +|
46 - get_merge_bases
47 + repo_get_merge_bases
48 |
@@ -36,6 +73,13 @@
73 |
74 - logmsg_reencode
75 + repo_logmsg_reencode
76 +|
77 +- get_commit_tree
78 ++ repo_get_commit_tree
79 +// diff.h
80 +|
81 +- diff_setup
82 ++ repo_diff_setup
83 // object-store.h
84 |
85 - read_object_file
@@ -50,6 +94,32 @@
94 |
95 - format_commit_message
96 + repo_format_commit_message
97 +// packfile.h
98 +|
99 +- approximate_object_count
100 ++ repo_approximate_object_count
101 +// promisor-remote.h
102 +|
103 +- promisor_remote_reinit
104 ++ repo_promisor_remote_reinit
105 +|
106 +- promisor_remote_find
107 ++ repo_promisor_remote_find
108 +|
109 +- has_promisor_remote
110 ++ repo_has_promisor_remote
111 +// refs.h
112 +|
113 +- dwim_ref
114 ++ repo_dwim_ref
115 +// rerere.h
116 +|
117 +- rerere
118 ++ repo_rerere
119 +// revision.h
120 +|
121 +- init_revisions
122 ++ repo_init_revisions
123 )
124 (
125 + the_repository,