Apparently this was believed to be fixed here: 14d7034. Maybe in your particular case it still is inverted? Or is the version you are using not the most recent one?
Thanks to a particularly occluded API GitPython can be really confusing, making it hard to understand what's diffed against what. Thus I would not be surprised if there are more issues slumbering there or the fix above isn't correct in all cases.
When I do this:
Then I see the same first file as when I do
git diff master
in the terminal. But, it gets the "+" and "-" backwards. In python I see lines such as:But this is a file I've added in the active branch that isn't in the master! In the terminal when I do
git diff master
I see:On the other hand, when I use
pprint(r.git.diff('master').split('\n'))
then I get the right result:The text was updated successfully, but these errors were encountered: