You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to do an example/diff.php but I have an 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
Warning: git_diff_tree_to_workdir() expects parameter 2 to be resource, boolean given in /srv/www/htdocs/index.php on line 7
Warning: git_diff_print() expects parameter 1 to be resource, null given in /srv/www/htdocs/index.php on line 15
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: #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.
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.
The text was updated successfully, but these errors were encountered: