Browse Source

Remove unused repository field from RevWalk

The comment about legacy Tag and Object types no longer applies,
though prior to Idb273d5a92849b42935ac14eed73b796b80aad50 the field
was still being used by RewriteTreeFilter.

Change-Id: I9ee5da8f8a3b61c9cf543817c03117ee0609dd8f
stable-3.0
Dave Borowitz 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
b0326235e1
  1. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java
  2. 10
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java

@ -189,7 +189,7 @@ public class RevWalkShallowTest extends RevWalkTestCase {
final StringBuilder builder = new StringBuilder(); final StringBuilder builder = new StringBuilder();
for (ObjectId commit : shallowCommits) for (ObjectId commit : shallowCommits)
builder.append(commit.getName() + "\n"); builder.append(commit.getName() + "\n");
JGitTestUtil.write(new File(rw.repository.getDirectory(), "shallow"), JGitTestUtil.write(new File(db.getDirectory(), "shallow"),
builder.toString()); builder.toString());
} }
} }

10
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java

@ -163,9 +163,6 @@ public class RevWalk implements Iterable<RevCommit> {
private static final int APP_FLAGS = -1 & ~((1 << RESERVED_FLAGS) - 1); private static final int APP_FLAGS = -1 & ~((1 << RESERVED_FLAGS) - 1);
/** Exists <b>ONLY</b> to support legacy Tag and Commit objects. */
final Repository repository;
final ObjectReader reader; final ObjectReader reader;
final MutableObjectId idBuffer; final MutableObjectId idBuffer;
@ -203,7 +200,7 @@ public class RevWalk implements Iterable<RevCommit> {
* released by the caller. * released by the caller.
*/ */
public RevWalk(final Repository repo) { public RevWalk(final Repository repo) {
this(repo, repo.newObjectReader()); this(repo.newObjectReader());
} }
/** /**
@ -215,11 +212,6 @@ public class RevWalk implements Iterable<RevCommit> {
* required. * required.
*/ */
public RevWalk(ObjectReader or) { public RevWalk(ObjectReader or) {
this(null, or);
}
private RevWalk(final Repository repo, final ObjectReader or) {
repository = repo;
reader = or; reader = or;
idBuffer = new MutableObjectId(); idBuffer = new MutableObjectId();
objects = new ObjectIdOwnerMap<RevObject>(); objects = new ObjectIdOwnerMap<RevObject>();

Loading…
Cancel
Save