import java.io.IOException;
import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
import org.eclipse.jgit.JGitText;
import org.eclipse.jgit.errors.CorruptObjectException;
private CanonicalTreeParser treeWalk;
+ private List<RevObject> rootObjects;
+
private BlockObjQueue pendingObjects;
private RevTree currentTree;
*/
public ObjectWalk(ObjectReader or) {
super(or);
+ rootObjects = new ArrayList<RevObject>();
pendingObjects = new BlockObjQueue();
treeWalk = new CanonicalTreeParser();
}
@Override
protected void reset(final int retainFlags) {
super.reset(retainFlags);
+
+ for (RevObject obj : rootObjects)
+ obj.flags &= ~IN_PENDING;
+
+ rootObjects = new ArrayList<RevObject>();
pendingObjects = new BlockObjQueue();
treeWalk = new CanonicalTreeParser();
currentTree = null;
private void addObject(final RevObject o) {
if ((o.flags & IN_PENDING) == 0) {
o.flags |= IN_PENDING;
+ rootObjects.add(o);
pendingObjects.add(o);
}
}