Browse Source

Merge "Fix RevCommitList to work with subclasses of RevWalk"

stable-0.9
Shawn Pearce 15 years ago committed by Code Review
parent
commit
8d761febc3
  1. 8
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java

8
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java

@ -302,16 +302,13 @@ public class RevCommitList<E extends RevCommit> extends RevObjectList<E> {
if (walker == null || size > highMark) if (walker == null || size > highMark)
return; return;
Generator p = walker.pending; RevCommit c = walker.next();
RevCommit c = p.next();
if (c == null) { if (c == null) {
walker.pending = EndGenerator.INSTANCE;
walker = null; walker = null;
return; return;
} }
enter(size, (E) c); enter(size, (E) c);
add((E) c); add((E) c);
p = walker.pending;
while (size <= highMark) { while (size <= highMark) {
int index = size; int index = size;
@ -331,9 +328,8 @@ public class RevCommitList<E extends RevCommit> extends RevObjectList<E> {
final Object[] dst = s.contents; final Object[] dst = s.contents;
while (size <= highMark && index < BLOCK_SIZE) { while (size <= highMark && index < BLOCK_SIZE) {
c = p.next(); c = walker.next();
if (c == null) { if (c == null) {
walker.pending = EndGenerator.INSTANCE;
walker = null; walker = null;
return; return;
} }

Loading…
Cancel
Save