PlotRefComparator: fix #timeof The #timeof method returned - the commit time in seconds since the epoch for RevCommits - the tagger time in milliseconds since the epoch for annotated tags Fix this by converting commit time to milliseconds to ensure consistent timestamp comparison of tags and commits. Change-Id: I91621da19c234fe823788d85e4077750cb5cba1a
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java index 39e8fd8..c8c454a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
@@ -169,8 +169,9 @@ public int compare(Ref o1, Ref o2) { } long timeof(RevObject o) { - if (o instanceof RevCommit) - return ((RevCommit) o).getCommitTime(); + if (o instanceof RevCommit) { + return ((RevCommit) o).getCommitTime() * 1000L; + } if (o instanceof RevTag) { RevTag tag = (RevTag) o; try {