summaryrefslogtreecommitdiff
path: root/src/git/commit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/git/commit.h')
-rw-r--r--src/git/commit.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/git/commit.h b/src/git/commit.h
index ea59a210d..1a57ba732 100644
--- a/src/git/commit.h
+++ b/src/git/commit.h
@@ -17,7 +17,17 @@ GIT_BEGIN_DECL
typedef struct git_commit git_commit;
/**
- * Lookup a commit from a revision pool, and parse it if needed.
+ * Locate a reference to a commit without loading it.
+ * @param pool the pool 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.
* @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.
@@ -25,7 +35,7 @@ typedef struct git_commit git_commit;
* pool's git_odb, or if the commit is present but is
* too malformed to be parsed successfully.
*/
-GIT_EXTERN(git_commit *) git_commit_lookup(git_revpool *pool, const git_oid *id);
+GIT_EXTERN(git_commit *) git_commit_parse(git_revpool *pool, const git_oid *id);
/**
* Get the id of a commit.