Merge branch 'nd/sha1-name-c-wo-the-repository'
Further code clean-up to allow the lowest level of name-to-object mapping layer to work with a passed-in repository other than the default one. * nd/sha1-name-c-wo-the-repository: (34 commits) sha1-name.c: remove the_repo from get_oid_mb() sha1-name.c: remove the_repo from other get_oid_* sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name submodule-config.c: use repo_get_oid for reading .gitmodules sha1-name.c: add repo_get_oid() sha1-name.c: remove the_repo from get_oid_with_context_1() sha1-name.c: remove the_repo from resolve_relative_path() sha1-name.c: remove the_repo from diagnose_invalid_index_path() sha1-name.c: remove the_repo from handle_one_ref() sha1-name.c: remove the_repo from get_oid_1() sha1-name.c: remove the_repo from get_oid_basic() sha1-name.c: remove the_repo from get_describe_name() sha1-name.c: remove the_repo from get_oid_oneline() sha1-name.c: add repo_interpret_branch_name() sha1-name.c: remove the_repo from interpret_branch_mark() sha1-name.c: remove the_repo from interpret_nth_prior_checkout() sha1-name.c: remove the_repo from get_short_oid() sha1-name.c: add repo_for_each_abbrev() sha1-name.c: store and use repo in struct disambiguate_state sha1-name.c: add repo_find_unique_abbrev_r() ...
This commit is contained in:
@ -10,19 +10,25 @@ expression c;
|
||||
- c->maybe_tree->object.oid.hash
|
||||
+ get_commit_tree_oid(c)->hash
|
||||
|
||||
// These excluded functions must access c->maybe_tree direcly.
|
||||
@@
|
||||
identifier f !~ "^(get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit)$";
|
||||
identifier f !~ "^set_commit_tree$";
|
||||
expression c;
|
||||
expression s;
|
||||
@@
|
||||
f(...) {<...
|
||||
- c->maybe_tree = s
|
||||
+ set_commit_tree(c, s)
|
||||
...>}
|
||||
|
||||
// These excluded functions must access c->maybe_tree direcly.
|
||||
// Note that if c->maybe_tree is written somewhere outside of these
|
||||
// functions, then the recommended transformation will be bogus with
|
||||
// repo_get_commit_tree() on the LHS.
|
||||
@@
|
||||
identifier f !~ "^(repo_get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit|set_commit_tree)$";
|
||||
expression c;
|
||||
@@
|
||||
f(...) {<...
|
||||
- c->maybe_tree
|
||||
+ get_commit_tree(c)
|
||||
+ repo_get_commit_tree(specify_the_right_repo_here, c)
|
||||
...>}
|
||||
|
||||
@@
|
||||
expression c;
|
||||
expression s;
|
||||
@@
|
||||
- get_commit_tree(c) = s
|
||||
+ c->maybe_tree = s
|
||||
|
Reference in New Issue
Block a user