diff options
author | Russell Belfer <rb@github.com> | 2013-04-16 22:51:02 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-22 18:52:06 +0400 |
commit | 3f27127d15dfe69943d3c9ddf96d09a2300de3a9 (patch) | |
tree | 77970a2d28265f4d4319f6613aff4a6501d57c12 /src/tree.c | |
parent | 786062639f05e361da977f3f1f6286141fa12fca (diff) |
Simplify object table parse functions
This unifies the object parse functions into one signature that
takes an odb_object.
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c index e66fa2370..d6d4b77d3 100644 --- a/src/tree.c +++ b/src/tree.c @@ -372,8 +372,10 @@ static int tree_error(const char *str, const char *path) return -1; } -int git_tree__parse(void *tree, const char *buffer, const char *buffer_end) +int git_tree__parse(void *tree, git_odb_object *odb_obj) { + const char *buffer = git_odb_object_data(odb_obj); + const char *buffer_end = buffer + git_odb_object_size(odb_obj); git_vector *tree_entries = &((git_tree *)tree)->entries; if (git_vector_init(tree_entries, DEFAULT_TREE_SIZE, entry_sort_cmp) < 0) |