I am trying to print the "diff" object as shown below. I am expecting an output similar to git show , but I am not getting the same. How do I achieve this? Thanks.
import pygit2
repo=pygit2.Repository('/home/repository')
t0=repo.revparse_single('HEAD')
t1=repo.revparse_single('HEAD^')
>>> repo.diff(t0,t1)
<_pygit2.Diff object at 0x7fc46eeb0470>
>>> out=repo.diff(t0,t1)
>>> print out
<_pygit2.Diff object at 0x7fc46eeb0410>
>>>