summaryrefslogtreecommitdiff
path: root/src/git/commit.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-05-14 18:44:49 +0200
committerAndreas Ericsson <ae@op5.se>2010-06-02 10:32:06 +0200
commit417f0abc9b41f01520df863567b25efd03bd281c (patch)
tree0ebbc36594071221b685805590415d74624f41e3 /src/git/commit.h
parent1bb11859357114684a1a740e471edf1a7541b82a (diff)
downloadlibgit2-417f0abc9b41f01520df863567b25efd03bd281c.tar.gz
Add basic functionality for commit lookup/parsing
The external API function "git_commit_parse" has been renamed to "git_commit_lookup" and has been partially implemented with support for loading commits straight from the ODB. It still lacks the functionality to lookup cached commits in the revpool and to resolve tags to commits. The following internal functions have been partially implemented: int git_commit__parse_buffer(...); int git_commit__parse_time(...); int git_commit__parse_oid(...); Commits are now fully parsed but the generated parent and tree references are not handled yet. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/git/commit.h')
-rw-r--r--src/git/commit.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/git/commit.h b/src/git/commit.h
index 010f258ae..ea59a210d 100644
--- a/src/git/commit.h
+++ b/src/git/commit.h
@@ -17,7 +17,7 @@ GIT_BEGIN_DECL
typedef struct git_commit git_commit;
/**
- * Parse (or lookup) a commit from a revision pool.
+ * Lookup a commit from a revision pool, and parse it if needed.
* @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 +25,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_parse(git_revpool *pool, const git_oid *id);
+GIT_EXTERN(git_commit *) git_commit_lookup(git_revpool *pool, const git_oid *id);
/**
* Get the id of a commit.