Derrick Stolee | 2e27bd7 | 2018-04-06 19:09:38 +0000 | [diff] [blame] | 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 | @@ |
Nguyễn Thái Ngọc Duy | a133c40 | 2019-04-16 16:33:18 +0700 | [diff] [blame] | 14 | identifier f !~ "^set_commit_tree$"; |
| 15 | expression c; |
| 16 | expression s; |
| 17 | @@ |
| 18 | f(...) {<... |
| 19 | - c->maybe_tree = s |
| 20 | + set_commit_tree(c, s) |
| 21 | ...>} |
| 22 | |
Elijah Newren | 15beaaa | 2019-11-05 17:07:23 +0000 | [diff] [blame] | 23 | // These excluded functions must access c->maybe_tree directly. |
Nguyễn Thái Ngọc Duy | a133c40 | 2019-04-16 16:33:18 +0700 | [diff] [blame] | 24 | // 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 Duy | 301b8c7 | 2019-04-16 16:33:19 +0700 | [diff] [blame] | 26 | // repo_get_commit_tree() on the LHS. |
Nguyễn Thái Ngọc Duy | a133c40 | 2019-04-16 16:33:18 +0700 | [diff] [blame] | 27 | @@ |
Nguyễn Thái Ngọc Duy | 301b8c7 | 2019-04-16 16:33:19 +0700 | [diff] [blame] | 28 | identifier f !~ "^(repo_get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit|set_commit_tree)$"; |
Derrick Stolee | 2e27bd7 | 2018-04-06 19:09:38 +0000 | [diff] [blame] | 29 | expression c; |
| 30 | @@ |
Jeff King | 4d168e7 | 2018-08-28 17:22:32 -0400 | [diff] [blame] | 31 | f(...) {<... |
Derrick Stolee | 2e27bd7 | 2018-04-06 19:09:38 +0000 | [diff] [blame] | 32 | - c->maybe_tree |
Nguyễn Thái Ngọc Duy | 301b8c7 | 2019-04-16 16:33:19 +0700 | [diff] [blame] | 33 | + repo_get_commit_tree(specify_the_right_repo_here, c) |
Jeff King | 4d168e7 | 2018-08-28 17:22:32 -0400 | [diff] [blame] | 34 | ...>} |
Abhishek Kumar | c49c82a | 2020-06-17 14:44:10 +0530 | [diff] [blame] | 35 | |
| 36 | @@ |
| 37 | struct commit *c; |
| 38 | expression 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 | ) |