diff --git a/plugins/git4idea/src/git4idea/history/GitFileHistory.java b/plugins/git4idea/src/git4idea/history/GitFileHistory.java index 768d671b8be7..7da3401f8155 100644 --- a/plugins/git4idea/src/git4idea/history/GitFileHistory.java +++ b/plugins/git4idea/src/git4idea/history/GitFileHistory.java @@ -118,7 +118,9 @@ public class GitFileHistory { } try { - Pair firstCommitParentAndPath = getFirstCommitParentAndPathIfRename(recordConsumer.getFirstCommit(), currentPath); + String firstCommit = recordConsumer.getFirstCommit(); + if (firstCommit == null) return; + Pair firstCommitParentAndPath = getFirstCommitParentAndPathIfRename(firstCommit, currentPath); if (firstCommitParentAndPath == null) { return; } @@ -448,7 +450,7 @@ public class GitFileHistory { return myCurrentPath.get(); } - @NotNull + @Nullable public String getFirstCommit() { return myFirstCommit.get(); }