diff options
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java | 10 |
2 files changed, 2 insertions, 10 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java index 479d9d304a..3e45d2eb9e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java +++ b/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(); for (ObjectId commit : shallowCommits) builder.append(commit.getName() + "\n"); - JGitTestUtil.write(new File(rw.repository.getDirectory(), "shallow"), + JGitTestUtil.write(new File(db.getDirectory(), "shallow"), builder.toString()); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java index 8e07048e21..ca5f4fe616 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/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); - /** Exists <b>ONLY</b> to support legacy Tag and Commit objects. */ - final Repository repository; - final ObjectReader reader; final MutableObjectId idBuffer; @@ -203,7 +200,7 @@ public class RevWalk implements Iterable<RevCommit> { * released by the caller. */ public RevWalk(final Repository repo) { - this(repo, repo.newObjectReader()); + this(repo.newObjectReader()); } /** @@ -215,11 +212,6 @@ public class RevWalk implements Iterable<RevCommit> { * required. */ public RevWalk(ObjectReader or) { - this(null, or); - } - - private RevWalk(final Repository repo, final ObjectReader or) { - repository = repo; reader = or; idBuffer = new MutableObjectId(); objects = new ObjectIdOwnerMap<RevObject>(); |