From 225fe21522a98075bdc18dae90ce459f797ac366 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Fri, 18 Jun 2010 13:06:34 +0200 Subject: Add support for tree objects in revision pools Commits now store pointers to their tree objects. Tree objects now work as separate git_revpool_object entities. Tree objects can be loaded and parsed inedependently from commits. Signed-off-by: Vicent Marti --- src/commit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/commit.c') diff --git a/src/commit.c b/src/commit.c index 11f76e30c..a1a5bf7f5 100644 --- a/src/commit.c +++ b/src/commit.c @@ -196,8 +196,9 @@ int git_commit__parse_buffer(git_commit *commit, void *data, size_t len) if (git_commit__parse_oid(&oid, &buffer, buffer_end, "tree ") < 0) return GIT_EOBJCORRUPTED; + commit->tree = git_tree_lookup(commit->object.pool, &oid); + /* - * TODO: load tree into commit object * TODO: commit grafts! */ -- cgit v1.2.1