List of usage examples for org.eclipse.jgit.lib ObjectId compareTo
@Override public final int compareTo(AnyObjectId other)
Compare this ObjectId to another and obtain a sort ordering.
From source file:com.google.gerrit.server.query.change.ConflictKey.java
License:Apache License
public ConflictKey(ObjectId commit, ObjectId otherCommit, SubmitType submitType, boolean contentMerge) { if (SubmitType.FAST_FORWARD_ONLY.equals(submitType) || commit.compareTo(otherCommit) < 0) { this.commit = commit; this.otherCommit = otherCommit; } else {//from www . j a va2 s . com this.commit = otherCommit; this.otherCommit = commit; } this.submitType = submitType; this.contentMerge = contentMerge; }