Get the tree pointed to by a commit.
pointer where to store the tree object
a previously loaded commit.
0 on success; error code otherwise