blob: af6dd4c20cae87d3364b59cedac80936f8ff3355 [file] [log] [blame]
Derrick Stolee2e27bd72018-04-06 19:09:38 +00001@@
2expression c;
3@@
4- &c->maybe_tree->object.oid
5+ get_commit_tree_oid(c)
6
7@@
8expression c;
9@@
10- c->maybe_tree->object.oid.hash
11+ get_commit_tree_oid(c)->hash
12
13@@
Nguyễn Thái Ngọc Duya133c402019-04-16 16:33:18 +070014identifier f !~ "^set_commit_tree$";
15expression c;
16expression s;
17@@
18 f(...) {<...
19- c->maybe_tree = s
20+ set_commit_tree(c, s)
21 ...>}
22
Elijah Newren15beaaa2019-11-05 17:07:23 +000023// These excluded functions must access c->maybe_tree directly.
Nguyễn Thái Ngọc Duya133c402019-04-16 16:33:18 +070024// Note that if c->maybe_tree is written somewhere outside of these
25// functions, then the recommended transformation will be bogus with
Nguyễn Thái Ngọc Duy301b8c72019-04-16 16:33:19 +070026// repo_get_commit_tree() on the LHS.
Nguyễn Thái Ngọc Duya133c402019-04-16 16:33:18 +070027@@
Nguyễn Thái Ngọc Duy301b8c72019-04-16 16:33:19 +070028identifier f !~ "^(repo_get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit|set_commit_tree)$";
Derrick Stolee2e27bd72018-04-06 19:09:38 +000029expression c;
30@@
Jeff King4d168e72018-08-28 17:22:32 -040031 f(...) {<...
Derrick Stolee2e27bd72018-04-06 19:09:38 +000032- c->maybe_tree
Nguyễn Thái Ngọc Duy301b8c72019-04-16 16:33:19 +070033+ repo_get_commit_tree(specify_the_right_repo_here, c)
Jeff King4d168e72018-08-28 17:22:32 -040034 ...>}
Abhishek Kumarc49c82a2020-06-17 14:44:10 +053035
36@@
37struct commit *c;
38expression E;
39@@
40(
41- c->generation = E;
42+ commit_graph_data_at(c)->generation = E;
43|
44- c->graph_pos = E;
45+ commit_graph_data_at(c)->graph_pos = E;
46|
47- c->generation
48+ commit_graph_generation(c)
49|
50- c->graph_pos
51+ commit_graph_position(c)
52)