[git] first commit can be empty when file history is empty

EA-103921
This commit is contained in:
Julia Beliaeva
2017-06-29 21:00:18 +03:00
parent 7e894d6f2e
commit cf6018c64d
@@ -118,7 +118,9 @@ public class GitFileHistory {
}
try {
Pair<String, FilePath> firstCommitParentAndPath = getFirstCommitParentAndPathIfRename(recordConsumer.getFirstCommit(), currentPath);
String firstCommit = recordConsumer.getFirstCommit();
if (firstCommit == null) return;
Pair<String, FilePath> 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();
}