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
{{ message }}
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
Calling blame fails on some files and seems to be easily repositories on any non-trivial repository, an example attached.
The problem seems to be in taking not the final blame graph slice (hence number of lines mismatches the number of commits per line). More specifically, the graph seems to be sorted in wrong order and the sorting currently relies on commit timestamp (https://github.com/src-d/go-git/blob/master/references.go#L50).
Any ideas why this could go wrong?
Here is an example on this (src-d/go-git) repository:
Submitted a pull request that addresses the edge case described above where committer timestamps (Comitter.When) are equal. Comparing the author timestamps (Author.When) in this case allows to sort the commits correctly(?).
I seem to be facing another issue with blame though where the order of revisions is apparently correct and yet the file in the tree does not match the final revision of it returned by the blame graph algorithm (number of lines mismatch). Not sure it's related to this (sorting) or not, will do more tests.
I was looking into this as well. In the blame_test.go file, if you add the test for file {"https://github.com/spinnaker/spinnaker.git", "f39d86f59a0781f130e8de6b2115329c1fbe9545", "README.adoc", concat( it will return this error.
To resolve this I tried to add the merge commits to the list of revisions and this did fix the error from occuring but it produces the wrong list of authors when doing the test. I'm pretty sure this is because the algorithm looks at the merge commit and attributes all of the changes that the merge introduced to the author of the merge, when in reality, it should look at both parents and see which parts came from which parent.
Calling blame fails on some files and seems to be easily repositories on any non-trivial repository, an example attached.
The problem seems to be in taking not the final blame graph slice (hence number of lines mismatches the number of commits per line). More specifically, the graph seems to be sorted in wrong order and the sorting currently relies on commit timestamp (https://github.com/src-d/go-git/blob/master/references.go#L50).
Any ideas why this could go wrong?
Here is an example on this (src-d/go-git) repository:
Output:
The text was updated successfully, but these errors were encountered: