diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-08 17:37:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-08 17:37:25 +0200 |
commit | 0b179f3175d1a152b1d22ce8352efda34b258ce2 (patch) | |
tree | 9e16191a22ae5cd48da67b0197af2aa94fc45462 /commit.h | |
parent | Merge branch 'cc/replace-graft-peel-tags' (diff) | |
parent | sha1-name.c: remove the_repo from get_oid_mb() (diff) | |
download | git-0b179f3175d1a152b1d22ce8352efda34b258ce2.tar.xz git-0b179f3175d1a152b1d22ce8352efda34b258ce2.zip |
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()
...
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -32,7 +32,7 @@ struct commit { /* * If the commit is loaded from the commit-graph file, then this - * member may be NULL. Only access it through get_commit_tree() + * member may be NULL. Only access it through repo_get_commit_tree() * or get_commit_tree_oid(). */ struct tree *maybe_tree; @@ -149,7 +149,8 @@ void repo_unuse_commit_buffer(struct repository *r, */ void free_commit_buffer(struct parsed_object_pool *pool, struct commit *); -struct tree *get_commit_tree(const struct commit *); +struct tree *repo_get_commit_tree(struct repository *, const struct commit *); +#define get_commit_tree(c) repo_get_commit_tree(the_repository, c) struct object_id *get_commit_tree_oid(const struct commit *); /* |