summaryrefslogtreecommitdiffstats
path: root/contrib/coccinelle/index-compatibility.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/coccinelle/index-compatibility.cocci')
-rw-r--r--contrib/coccinelle/index-compatibility.cocci36
1 files changed, 27 insertions, 9 deletions
diff --git a/contrib/coccinelle/index-compatibility.cocci b/contrib/coccinelle/index-compatibility.cocci
index 8520f03128..31e36cf3c4 100644
--- a/contrib/coccinelle/index-compatibility.cocci
+++ b/contrib/coccinelle/index-compatibility.cocci
@@ -1,6 +1,7 @@
// the_index.* variables
@@
identifier AC = active_cache;
+identifier AN = active_nr;
identifier ACC = active_cache_changed;
identifier ACT = active_cache_tree;
@@
@@ -8,6 +9,9 @@ identifier ACT = active_cache_tree;
- AC
+ the_index.cache
|
+- AN
++ the_index.cache_nr
+|
- ACC
+ the_index.cache_changed
|
@@ -15,19 +19,13 @@ identifier ACT = active_cache_tree;
+ the_index.cache_tree
)
-@@
-identifier AN = active_nr;
-identifier f != prepare_to_commit;
-@@
- f(...) {<...
-- AN
-+ the_index.cache_nr
- ...>}
-
// "the_repository" simple cases
@@
@@
(
+- read_cache
++ repo_read_index
+|
- read_cache_unmerged
+ repo_read_index_unmerged
|
@@ -96,6 +94,15 @@ identifier f != prepare_to_commit;
|
- resolve_undo_clear
+ resolve_undo_clear_index
+|
+- cache_name_pos
++ index_name_pos
+|
+- update_main_cache_tree
++ cache_tree_update
+|
+- discard_cache
++ discard_index
)
(
+ &the_index,
@@ -137,3 +144,14 @@ identifier f != prepare_to_commit;
...
+ , NULL, NULL, NULL
)
+
+@@
+expression O;
+@@
+- write_cache_as_tree
++ write_index_as_tree
+ (
+- O,
++ O, &the_index, get_index_file(),
+ ...
+ )