Skip to content

Commit 7258e89

Browse files
avargitster
authored andcommitted
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. 2abf350 (revision.c: remove implicit dependency on the_index, 2018-09-21) 2. e675765 (diff.c: remove implicit dependency on the_index, 2018-09-21) 3. 35843b1 (rerere.c: remove implicit dependency on the_index, 2018-09-21) Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5978de2 commit 7258e89

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

contrib/coccinelle/the_repository.pending.cocci

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,44 @@
55
@@
66
@@
77
(
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
844
// commit-reach.h
45+
|
946
- get_merge_bases
1047
+ repo_get_merge_bases
1148
|
@@ -36,6 +73,13 @@
3673
|
3774
- logmsg_reencode
3875
+ repo_logmsg_reencode
76+
|
77+
- get_commit_tree
78+
+ repo_get_commit_tree
79+
// diff.h
80+
|
81+
- diff_setup
82+
+ repo_diff_setup
3983
// object-store.h
4084
|
4185
- read_object_file
@@ -50,6 +94,32 @@
5094
|
5195
- format_commit_message
5296
+ 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
53123
)
54124
(
55125
+ the_repository,

0 commit comments

Comments
 (0)