You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command iter_change_type(change_type) returns that file was modified when actually it was renamed. I think that the problem is in this condition elif change_type == "M" and diff.a_blob and diff.b_blob and diff.a_blob != diff.b_blob: yield diff
which is satisfied for some renamed files when the hashes for a_blob and b_blob change. I know that this shouldn't be the case and that the hashes should be the same in case of file renaming, but I have a several diffs with this problem.
Do you know how can I overcome this problem and have you thought about adding an extra condition that diff.renamed == False?
Thanks for having dug into the issue, as I think your work can greatly facilitate a PR.
I think this kind of issue could easily be fixed by adding a respective test-case and then adjust the code for this to be fixed. A PR is very welcome.
I've looked into the code, and, correct me if I'm mistaken, but I think that the root of the problem regarding the changing hash comes from the __hash__() method in IndexObject, which Blob inherits from. The hash for IndexObject is calculated from path as "index items are uniquely identifiable by path, not by their data". So maybe Blob should override the base class' __hash__() method?
Does that sound right, or am I a bit off base here?
Command
iter_change_type(change_type)
returns that file was modified when actually it was renamed. I think that the problem is in this conditionelif change_type == "M" and diff.a_blob and diff.b_blob and diff.a_blob != diff.b_blob: yield diff
which is satisfied for some renamed files when the hashes for
a_blob
andb_blob
change. I know that this shouldn't be the case and that the hashes should be the same in case of file renaming, but I have a several diffs with this problem.Do you know how can I overcome this problem and have you thought about adding an extra condition that
diff.renamed == False
?Link to photo https://imgur.com/a/0DrhOUu
The text was updated successfully, but these errors were encountered: