git: cleanup

This commit is contained in:
Aleksey Pivovarov
2016-01-28 17:47:18 +03:00
parent be1f9289a1
commit 8b17f7b607
@@ -171,7 +171,7 @@ public class GitAnnotationProvider implements AnnotationProviderEx, VcsCacheable
s.nextLine();
// parse commit information
CommitInfo commit = commits.get(commitHash);
if (commit != null) {
if (commit != null || commitHash == null) {
while (s.hasMoreData() && !s.startsWith('\t')) {
s.nextLine();
}
@@ -181,10 +181,10 @@ public class GitAnnotationProvider implements AnnotationProviderEx, VcsCacheable
while (s.hasMoreData() && !s.startsWith('\t')) {
String key = s.spaceToken();
String value = s.line();
if (commitHash != null && AUTHOR_KEY.equals(key)) {
if (AUTHOR_KEY.equals(key)) {
commit.author = value;
}
if (commitHash != null && COMMITTER_TIME_KEY.equals(key)) {
if (COMMITTER_TIME_KEY.equals(key)) {
commit.date = GitUtil.parseTimestamp(value);
commit.revision = new GitRevisionNumber(commitHash, commit.date);
}