-
-
Notifications
You must be signed in to change notification settings - Fork 934
Fix rename change type & support 'change in type' #755
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution. Something stuck out that I think needs fixing.
After that I am happy to merge.
git/diff.py
Outdated
# Change type can be R100 | ||
# R: status letter | ||
# 100: score (in case of copy and rename) | ||
change_type = change_type[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is interesting: change_type is reassigned, and thus just a single character. One line later, change_type is treated as the original string to get the score, which probably is always empty now.
self.assertEqual(diff.rename_from, None) | ||
self.assertEqual(diff.rename_to, None) | ||
self.assertEqual(diff.change_type, 'T') | ||
self.assertEqual(len(list(diffs.iter_change_type('T'))), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a test for score
is missing. It's likely to not work in the current implementation.
Also store the rename score
Codecov Report
@@ Coverage Diff @@
## master #755 +/- ##
==========================================
+ Coverage 94.67% 94.68% +<.01%
==========================================
Files 59 59
Lines 9322 9339 +17
==========================================
+ Hits 8826 8843 +17
Misses 496 496
Continue to review full report at Codecov.
|
oh sorry, I didn't red this old commit correctly, it was not finished.... I fixed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the quick fix and your contribution.
I will cut a new release now.
glad to see this issue solved |
Hello,
It fixes #563, we now parse correctly the change type and store the score if given. I didn't manage to create a copied status in my git so I didn't support it for now. Hope I will find some time later to give another try.
Regards,
Aurélien