Closed laczak closed 10 years ago
This is the correct response. git_tree_lookup requires the id of a git tree object, not a git commit object. So by giving it a git commit object you generated the error: Warning: git_tree_lookup(): WARNING -3 git_commit_lookup - The requested type does not match the type in the ODB in /srv/www/htdocs/index.php on line 6
The other errors are because $tree is null instead of being a git tree resource.
I've added two tests of git_tree_lookup using libgit2's tests as a model: https://github.com/libgit2/php-git/pull/69
The test first uses a known tree hash from the libgit2 testrepo and verifies the lookup was successful.
The second test uses a known file hash from the libgit2 testrepo and verifies that $tree is null.
thanks garyamort. this is expected behaviour. please check api doc. http://libgit2.github.com/libgit2/#v0.20.0/group/tree/git_tree_lookup
Hi, I'm trying to do an example/diff.php but I have an error:
Source code:
The error is in this line:
This hash is one of my commit hash.