-
-
Notifications
You must be signed in to change notification settings - Fork 933
When diffing index 'HEAD', can't get 'A' change_type but 'D' #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To me it seems like the order is merely inverted. What does it say if you invert the arguments, like so: r.head.commit.diff(git.IndexFile.Index) |
Thank you for quick response Byron. Like you said, inverting the order worked for me.
I'm closing this issue because it's not a bug It turned out that I trusted my intuition more than gitPython's intention. :( |
Just to help anyone having the same problem, reverting order means to add Found in another issue #882 (comment) |
So, this issue is about
I tried several times doing repo.index.diff('HEAD') on modified or on added files. On modified files it worked like charm. But on new files, gitPython doesn't return diff with change_type=='A' but 'D'.
I tried on gitpython 2.0.8 with python3 on Linux, and 2.0.9.dev(pyPI ver) on Windows 7. Resulted same.
here's what i did
The text was updated successfully, but these errors were encountered: