- commit = lookup_commit_reference(&oid);
- read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
- type = sha1_object_info(oid.hash, &size);
+ commit = lookup_commit_reference(the_repository, &oid);
+ read_tree_recursive(the_repository, commit->maybe_tree,
+ "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
+ type = oid_object_info(the_repository, &oid, &size);