-
Notifications
You must be signed in to change notification settings - Fork 158
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
Use GitBlameLineInfo
for processing git blame output in aggregateBlameAuthorModifiedAndDateInfo
#2196
Comments
May I try this issue? |
@logical-1985516 Sure, please do let us know if you have any questions! |
This comment was marked as outdated.
This comment was marked as outdated.
Hi, should we change commit-time in processGitBlameResultLine to author-time? Originally, author-time is used, and the discrepancy between author-time and commit-time has caused some test cases to fail. |
@logical-1985516 Thanks for investigating what caused the test cases to fail. You can make the changes you described. Also, since you already have a PR open, you can discuss this problem in PR #2232 itself, as that gives us the most context. |
…nd date info (#2232) `aggregateBlameAuthorModifiedAndDateInfo` is hard to maintain, due to complex string wrangling and seemingly magic numbers. Let's fix these using `GitBlameLineInfo` introduced in #2140. - Use blameLine to abstract away the string wrangling and improve understandability. Magic numbers are also replaced to improve code quality. - In order to use blameLine however, it is also changed to use author-time instead of commit-time, as there is a discrepancy between the two, causing some test cases to fail. - The naming of the timestamp field in GitBlameLineInfo is changed to reflect that it is in seconds, as author-time is in seconds.
What feature(s) would you like to see in RepoSense
RepoSense/src/main/java/reposense/authorship/FileInfoAnalyzer.java
Lines 158 to 183 in bf78bf2
aggregateBlameAuthorModifiedAndDateInfo
inFileInfoAnalyzer.java
does some manual string wrangling of git blame output which is hard to interpret, contains magic numbers and breaks the git blame abstraction.If possible, describe the solution
#2140 Introduces
GitBlameLineInfo
, returned byblameLine
, which encapsulates this string wrangling logic. We can replace this manual string processing by using this method inaggregateBlameAuthorModifiedAndDateInfo
.The text was updated successfully, but these errors were encountered: