aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit/src
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-06-28 18:25:22 -0700
committerShawn O. Pearce <spearce@spearce.org>2010-06-28 18:47:29 -0700
commit121d009b9b7159ca0bd73a7c25b925516852a026 (patch)
treed988944e8d9d55100252bb9fb668b0e2c5b6ced0 /org.eclipse.jgit.junit/src
parent06f635a4bc315a90d87ae07d0245424d62696373 (diff)
downloadjgit-121d009b9b7159ca0bd73a7c25b925516852a026.tar.gz
jgit-121d009b9b7159ca0bd73a7c25b925516852a026.zip
Use ObjectReader in RevWalk, TreeWalk
We don't actually need a Repository object here, just an ObjectReader that can load content for us. So change the API to depend on that. However, this breaks the asCommit and asTag legacy translation methods on RevCommit and RevTag, so we still have to keep the Repository inside of RevWalk for those two types. Hopefully we can drop those in the future, and then drop the Repository off the RevWalk. Change-Id: Iba983e48b663790061c43ae9ffbb77dfe6f4818e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index a179773d15..96b616889c 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -272,7 +272,7 @@ public class TestRepository<R extends Repository> {
*/
public RevObject get(final RevTree tree, final String path)
throws AssertionFailedError, Exception {
- final TreeWalk tw = new TreeWalk(db);
+ final TreeWalk tw = new TreeWalk(pool.getObjectReader());
tw.setFilter(PathFilterGroup.createFromStrings(Collections
.singleton(path)));
tw.reset(tree);