Skip to content

Commit

Permalink
Minor naming change isAuthorTime -> useAuthorTime
Browse files Browse the repository at this point in the history
  • Loading branch information
gok99 committed Oct 24, 2024
1 parent 6089ffe commit 623a8ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/reposense/git/GitBlame.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ private static List<GitBlameLineInfo> processGitBlameResultLines(String blameRes
}

/**
* Returns the processed result of {@code blameResultLines}, with reference to {@code isAuthorTime}.
* Returns the processed result of {@code blameResultLines}, with reference to {@code useAuthorTime}.
* If {@code useAuthorTime} is false, committer-time will be used for the timestamp.
*/
private static GitBlameLineInfo processGitBlameResultLine(String[] blameResultLines, boolean isAuthorTime) {
private static GitBlameLineInfo processGitBlameResultLine(String[] blameResultLines, boolean useAuthorTime) {
String commitHash = blameResultLines[0].substring(0, FULL_COMMIT_HASH_LENGTH);
String authorName = blameResultLines[1].substring(AUTHOR_NAME_OFFSET);
String authorEmail = blameResultLines[2].substring(AUTHOR_EMAIL_OFFSET).replaceAll("[<>]", "");
long timestampInSeconds;
if (isAuthorTime) {
if (useAuthorTime) {
timestampInSeconds = Long.parseLong(blameResultLines[3].substring(AUTHOR_TIME_OFFSET));
} else {
timestampInSeconds = Long.parseLong(blameResultLines[5].substring(COMMIT_TIME_OFFSET));
Expand Down

0 comments on commit 623a8ab

Please sign in to comment.