From 35b01dac4c81542b195169e3b7365c12a165232c Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 13 Aug 2010 01:47:17 +0200 Subject: [PATCH] Fix RevCommitList to work with subclasses of RevWalk Bug: 321502 Change-Id: Ic4bc49a0da90234271aea7c0a4e344a1c3620cfc Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/revwalk/RevCommitList.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java index 906f27c53d..753cbad5ff 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java @@ -302,16 +302,13 @@ public class RevCommitList extends RevObjectList { 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 class RevCommitList extends RevObjectList { 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; } -- 2.39.5