{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/pygit2/issues/484","labels_url":"https://api.github.com/repos/libgit2/pygit2/issues/484/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/pygit2/issues/484/comments","events_url":"https://api.github.com/repos/libgit2/pygit2/issues/484/events","html_url":"https://github.com/libgit2/pygit2/issues/484","id":56404950,"number":484,"title":"diff does not generate any output: pygit2","user":{"login":"zack211","id":10734234,"avatar_url":"https://avatars.githubusercontent.com/u/10734234?v=3","gravatar_id":"","url":"https://api.github.com/users/zack211","html_url":"https://github.com/zack211","followers_url":"https://api.github.com/users/zack211/followers","following_url":"https://api.github.com/users/zack211/following{/other_user}","gists_url":"https://api.github.com/users/zack211/gists{/gist_id}","starred_url":"https://api.github.com/users/zack211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack211/subscriptions","organizations_url":"https://api.github.com/users/zack211/orgs","repos_url":"https://api.github.com/users/zack211/repos","events_url":"https://api.github.com/users/zack211/events{/privacy}","received_events_url":"https://api.github.com/users/zack211/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-03T16:55:12Z","updated_at":"2015-02-07T17:43:08Z","closed_at":null,"body":"I am trying to do something similar to \"git show\" . So when I try to print the result of diff , I don't get what I am expecting. I am referring the pygit2 documentation. What is the problem here?\r\n\r\nimport pygit2\r\nrepo=pygit2.Repository('/home/repository')\r\n\r\nt0=repo.revparse_single('HEAD').tree\r\nt1=repo.revparse_single('HEAD^').tree\r\n\r\n\r\n>>> repo.diff(t0,t1)\r\n<_pygit2.Diff object at 0x7fc46eeb0470>\r\n>>> out=repo.diff(t0,t1)\r\n>>> print out\r\n<_pygit2.Diff object at 0x7fc46eeb0410>\r\n>>> "},"comment":{"url":"https://api.github.com/repos/libgit2/pygit2/issues/comments/73374232","html_url":"https://github.com/libgit2/pygit2/issues/484#issuecomment-73374232","issue_url":"https://api.github.com/repos/libgit2/pygit2/issues/484","id":73374232,"user":{"login":"zack211","id":10734234,"avatar_url":"https://avatars.githubusercontent.com/u/10734234?v=3","gravatar_id":"","url":"https://api.github.com/users/zack211","html_url":"https://github.com/zack211","followers_url":"https://api.github.com/users/zack211/followers","following_url":"https://api.github.com/users/zack211/following{/other_user}","gists_url":"https://api.github.com/users/zack211/gists{/gist_id}","starred_url":"https://api.github.com/users/zack211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack211/subscriptions","organizations_url":"https://api.github.com/users/zack211/orgs","repos_url":"https://api.github.com/users/zack211/repos","events_url":"https://api.github.com/users/zack211/events{/privacy}","received_events_url":"https://api.github.com/users/zack211/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T17:43:08Z","updated_at":"2015-02-07T17:43:08Z","body":"Yes. It works! Thanks. Btw I want to find all the code changes in a repository. Is below the right way to do? Will this ensure that I get all the differences if I find the diff between \"t0\" and \"t1\" ? Thanks\r\n\r\nt0=repo.revparse_single('HEAD').tree\r\nt1=repo.revparse_single('HEAD^').tree"}}