]> source.dussan.org Git - jgit.git/commitdiff
GraphCommits: Remove unused getter by position 85/197685/2
authorIvan Frade <ifrade@google.com>
Tue, 6 Dec 2022 23:59:03 +0000 (15:59 -0800)
committerIvan Frade <ifrade@google.com>
Tue, 13 Dec 2022 22:37:37 +0000 (14:37 -0800)
CommitGraphWriter uses the GraphCommits in for-each loops and doesn't
need the access by position anymore. This was a left-over from
https://git.eclipse.org/r/c/jgit/jgit/+/182832

Remove the unused method.

Change-Id: I39df9bfab2601d581705ddf4cea3c04ed4765ff9

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphCommits.java

index 23234f9109056f2f92e4ff9618befcaf4b6446ae..ccf6d0e66ae31a321fe775ded5b5de666c0606ce 100644 (file)
@@ -116,13 +116,6 @@ public class GraphCommits implements Iterable<RevCommit> {
                return commitWithPosition.position;
        }
 
-       RevCommit getCommit(int oidPos) {
-               if (oidPos < 0 || oidPos >= sortedCommits.size()) {
-                       return null;
-               }
-               return sortedCommits.get(oidPos);
-       }
-
        int getExtraEdgeCnt() {
                return extraEdgeCnt;
        }