Merge branch 'tb/filter-alternate-refs'
[git] / contrib / coccinelle / commit.cocci
1 @@
2 expression c;
3 @@
4 - &c->maybe_tree->object.oid
5 + get_commit_tree_oid(c)
6
7 @@
8 expression c;
9 @@
10 - c->maybe_tree->object.oid.hash
11 + get_commit_tree_oid(c)->hash
12
13 // These excluded functions must access c->maybe_tree direcly.
14 @@
15 identifier f !~ "^(get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit)$";
16 expression c;
17 @@
18   f(...) {<...
19 - c->maybe_tree
20 + get_commit_tree(c)
21   ...>}
22
23 @@
24 expression c;
25 expression s;
26 @@
27 - get_commit_tree(c) = s
28 + c->maybe_tree = s