t/t9*: avoid redundant uses of cat
[git.git] / contrib / coccinelle / index-compatibility.cocci
blob31e36cf3c4167e77a9b1d21154b39d6f31209411
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 @@
9 - AC
10 + the_index.cache
12 - AN
13 + the_index.cache_nr
15 - ACC
16 + the_index.cache_changed
18 - ACT
19 + the_index.cache_tree
22 // "the_repository" simple cases
26 - read_cache
27 + repo_read_index
29 - read_cache_unmerged
30 + repo_read_index_unmerged
32 - hold_locked_index
33 + repo_hold_locked_index
35   (
36 + the_repository,
37   ...)
39 // "the_repository" special-cases
43 - read_cache_preload
44 + repo_read_index_preload
46   (
47 + the_repository,
48   ...
49 + , 0
50   )
52 // "the_index" simple cases
56 - is_cache_unborn
57 + is_index_unborn
59 - unmerged_cache
60 + unmerged_index
62 - rename_cache_entry_at
63 + rename_index_entry_at
65 - chmod_cache_entry
66 + chmod_index_entry
68 - cache_file_exists
69 + index_file_exists
71 - cache_name_is_other
72 + index_name_is_other
74 - unmerge_cache_entry_at
75 + unmerge_index_entry_at
77 - add_to_cache
78 + add_to_index
80 - add_file_to_cache
81 + add_file_to_index
83 - add_cache_entry
84 + add_index_entry
86 - remove_file_from_cache
87 + remove_file_from_index
89 - ce_match_stat
90 + ie_match_stat
92 - ce_modified
93 + ie_modified
95 - resolve_undo_clear
96 + resolve_undo_clear_index
98 - cache_name_pos
99 + index_name_pos
101 - update_main_cache_tree
102 + cache_tree_update
104 - discard_cache
105 + discard_index
107   (
108 + &the_index,
109   ...)
114 - refresh_and_write_cache
115 + repo_refresh_and_write_index
117   (
118 + the_repository,
119   ...
120 + , NULL, NULL, NULL
121   )
123 // "the_index" special-cases
127 - read_cache_from
128 + read_index_from
130   (
131 + &the_index,
132   ...
133 + , get_git_dir()
134   )
139 - refresh_cache
140 + refresh_index
142   (
143 + &the_index,
144   ...
145 + , NULL, NULL, NULL
146   )
149 expression O;
151 - write_cache_as_tree
152 + write_index_as_tree
153   (
154 - O,
155 + O, &the_index, get_index_file(),
156   ...
157   )