diff options
Diffstat (limited to 'src/git/commit.h')
-rw-r--r-- | src/git/commit.h | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/git/commit.h b/src/git/commit.h index 89f0929c9..56243c5be 100644 --- a/src/git/commit.h +++ b/src/git/commit.h @@ -4,6 +4,7 @@ #include "common.h" #include "oid.h" #include "tree.h" +#include "repository.h" /** * @file git/commit.h @@ -18,31 +19,16 @@ GIT_BEGIN_DECL typedef struct git_commit git_commit; /** - * Locate a reference to a commit without loading it. + * Lookup a commit object from a repository. * The generated commit object is owned by the revision - * pool and shall not be freed by the user. + * repo and shall not be freed by the user. * - * @param pool the pool to use when locating the commit. + * @param repo the repo to use when locating the commit. * @param id identity of the commit to locate. If the object is * an annotated tag it will be peeled back to the commit. * @return the commit; NULL if the commit could not be created */ -GIT_EXTERN(git_commit *) git_commit_lookup(git_revpool *pool, const git_oid *id); - -/** - * Locate a reference to a commit, and try to load and parse it it from - * the commit cache or the object database. - * The generated commit object is owned by the revision - * pool and shall not be freed by the user. - * - * @param pool the pool to use when parsing/caching the commit. - * @param id identity of the commit to locate. If the object is - * an annotated tag it will be peeled back to the commit. - * @return the commit; NULL if the commit does not exist in the - * pool's git_odb, or if the commit is present but is - * too malformed to be parsed successfully. - */ -GIT_EXTERN(git_commit *) git_commit_parse(git_revpool *pool, const git_oid *id); +GIT_EXTERN(git_commit *) git_commit_lookup(git_repository *repo, const git_oid *id); /** * Get the id of a commit. |