Browse files

Fix RevCommitList to work with subclasses of RevWalk

Bug: 321502
Change-Id: Ic4bc49a0da90234271aea7c0a4e344a1c3620cfc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
  • Loading branch information...
1 parent cfe88d3 commit 35b01dac4c81542b195169e3b7365c12a165232c @msohn msohn committed Aug 13, 2010
Showing with 2 additions and 6 deletions.
  1. +2 −6 org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java
View
8 org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java
@@ -302,16 +302,13 @@ public void fillTo(final int highMark) throws MissingObjectException,
if (walker == null || size > highMark)
return;
- Generator p = walker.pending;
- RevCommit c = p.next();
+ RevCommit c = walker.next();
if (c == null) {
- walker.pending = EndGenerator.INSTANCE;
walker = null;
return;
}
enter(size, (E) c);
add((E) c);
- p = walker.pending;
while (size <= highMark) {
int index = size;
@@ -331,9 +328,8 @@ public void fillTo(final int highMark) throws MissingObjectException,
final Object[] dst = s.contents;
while (size <= highMark && index < BLOCK_SIZE) {
- c = p.next();
+ c = walker.next();
if (c == null) {
- walker.pending = EndGenerator.INSTANCE;
walker = null;
return;
}

0 comments on commit 35b01da

Please sign in to comment.