I have:
- 5 modified but unstaged files
- 2 modified and staged files
- thus 7 modified files.
I know the following GitPython equivalents to git commands:
repo.index.diff(None)gives the same result asgit diff- 5 modified but unstaged filesrepo.index.diff('HEAD')surprisingly gives the same result asgit diff --staged- 2 modified and staged files
Thus my question is, what is GitPython equivalent to git diff HEAD?
P.S. I can merge results of repo.index.diff(None) and repo.index.diff('HEAD') to get the desired output but it looks quite stupid...
git diff HEAD. There's no general-Python answer either, really, as you're looking for something built into the GitPython library. So the only appropriate tag here is gitpython...