diff options
author | Russell Belfer <rb@github.com> | 2013-04-16 11:51:02 -0700 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-22 16:52:06 +0200 |
commit | 3f27127d15dfe69943d3c9ddf96d09a2300de3a9 (patch) | |
tree | 77970a2d28265f4d4319f6613aff4a6501d57c12 /src/commit.c | |
parent | 786062639f05e361da977f3f1f6286141fa12fca (diff) | |
download | libgit2-3f27127d15dfe69943d3c9ddf96d09a2300de3a9.tar.gz |
Simplify object table parse functions
This unifies the object parse functions into one signature that
takes an odb_object.
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c index 3eca5b341..46c02c292 100644 --- a/src/commit.c +++ b/src/commit.c @@ -168,9 +168,11 @@ int git_commit_create( return retval; } -int git_commit__parse(void *_commit, const char *buffer, const char *buffer_end) +int git_commit__parse(void *_commit, git_odb_object *odb_obj) { git_commit *commit = _commit; + const char *buffer = git_odb_object_data(odb_obj); + const char *buffer_end = buffer + git_odb_object_size(odb_obj); git_oid parent_id; if (git_vector_init(&commit->parent_ids, 4, NULL) < 0) |