/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> and others
+ * Copyright (C) 2008, 2022 Shawn O. Pearce <spearce@spearce.org> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* the repository the walker will obtain data from.
*/
public ObjectWalk(Repository repo) {
- this(repo.newObjectReader());
+ this(repo.newObjectReader(), true);
}
/**
* required.
*/
public ObjectWalk(ObjectReader or) {
- super(or);
+ this(or, false);
+ }
+
+ private ObjectWalk(ObjectReader or, boolean closeReader) {
+ super(or, closeReader);
setRetainBody(false);
rootObjects = new ArrayList<>();
pendingObjects = new BlockObjQueue();
this(or, false);
}
- private RevWalk(ObjectReader or, boolean closeReader) {
+ RevWalk(ObjectReader or, boolean closeReader) {
reader = or;
idBuffer = new MutableObjectId();
objects = new ObjectIdOwnerMap<>();