From 8b17f7b6078dc57911d1e120f7b298ac59ab04db Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 22 Jan 2016 18:39:31 +0300 Subject: [PATCH] git: cleanup --- .../src/git4idea/annotate/GitAnnotationProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/git4idea/src/git4idea/annotate/GitAnnotationProvider.java b/plugins/git4idea/src/git4idea/annotate/GitAnnotationProvider.java index e09f2e8afad4..d38557c5f840 100644 --- a/plugins/git4idea/src/git4idea/annotate/GitAnnotationProvider.java +++ b/plugins/git4idea/src/git4idea/annotate/GitAnnotationProvider.java @@ -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); }