]> git.ipfire.org Git - thirdparty/git.git/blob - contrib/coccinelle/index-compatibility.cocci
Merge branch 'en/ort-finalize-after-0-merges-fix'
[thirdparty/git.git] / contrib / coccinelle / index-compatibility.cocci
1 // the_index.* variables
2 @@
3 identifier AC = active_cache;
4 identifier AN = active_nr;
5 identifier ACC = active_cache_changed;
6 identifier ACT = active_cache_tree;
7 @@
8 (
9 - AC
10 + the_index.cache
11 |
12 - AN
13 + the_index.cache_nr
14 |
15 - ACC
16 + the_index.cache_changed
17 |
18 - ACT
19 + the_index.cache_tree
20 )
21
22 // "the_repository" simple cases
23 @@
24 @@
25 (
26 - read_cache
27 + repo_read_index
28 |
29 - read_cache_unmerged
30 + repo_read_index_unmerged
31 |
32 - hold_locked_index
33 + repo_hold_locked_index
34 )
35 (
36 + the_repository,
37 ...)
38
39 // "the_repository" special-cases
40 @@
41 @@
42 (
43 - read_cache_preload
44 + repo_read_index_preload
45 )
46 (
47 + the_repository,
48 ...
49 + , 0
50 )
51
52 // "the_index" simple cases
53 @@
54 @@
55 (
56 - is_cache_unborn
57 + is_index_unborn
58 |
59 - unmerged_cache
60 + unmerged_index
61 |
62 - rename_cache_entry_at
63 + rename_index_entry_at
64 |
65 - chmod_cache_entry
66 + chmod_index_entry
67 |
68 - cache_file_exists
69 + index_file_exists
70 |
71 - cache_name_is_other
72 + index_name_is_other
73 |
74 - unmerge_cache_entry_at
75 + unmerge_index_entry_at
76 |
77 - add_to_cache
78 + add_to_index
79 |
80 - add_file_to_cache
81 + add_file_to_index
82 |
83 - add_cache_entry
84 + add_index_entry
85 |
86 - remove_file_from_cache
87 + remove_file_from_index
88 |
89 - ce_match_stat
90 + ie_match_stat
91 |
92 - ce_modified
93 + ie_modified
94 |
95 - resolve_undo_clear
96 + resolve_undo_clear_index
97 |
98 - cache_name_pos
99 + index_name_pos
100 |
101 - update_main_cache_tree
102 + cache_tree_update
103 |
104 - discard_cache
105 + discard_index
106 )
107 (
108 + &the_index,
109 ...)
110
111 @@
112 @@
113 (
114 - refresh_and_write_cache
115 + repo_refresh_and_write_index
116 )
117 (
118 + the_repository,
119 ...
120 + , NULL, NULL, NULL
121 )
122
123 // "the_index" special-cases
124 @@
125 @@
126 (
127 - read_cache_from
128 + read_index_from
129 )
130 (
131 + &the_index,
132 ...
133 + , get_git_dir()
134 )
135
136 @@
137 @@
138 (
139 - refresh_cache
140 + refresh_index
141 )
142 (
143 + &the_index,
144 ...
145 + , NULL, NULL, NULL
146 )
147
148 @@
149 expression O;
150 @@
151 - write_cache_as_tree
152 + write_index_as_tree
153 (
154 - O,
155 + O, &the_index, get_index_file(),
156 ...
157 )