[git] IDEA-120042 Protect against zero timestamp

This commit is contained in:
Kirill Likhodedov
2014-01-29 19:08:26 +04:00
parent fe3a49af30
commit 31f68579ee
@@ -43,10 +43,10 @@ class VcsLogMultiRepoJoiner {
@NotNull
private static TimedVcsCommit findLatestCommit(@NotNull Set<TimedVcsCommit> commits) {
long maxTimeStamp = 0;
long maxTimeStamp = Long.MIN_VALUE;
TimedVcsCommit lastCommit = null;
for (TimedVcsCommit commit : commits) {
if (commit.getTime() > maxTimeStamp) {
if (commit.getTime() >= maxTimeStamp) {
maxTimeStamp = commit.getTime();
lastCommit = commit;
}