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 d23c0d3c2..29a410019 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 @@ -757,7 +757,7 @@ public class TestRepository { public void updateServerInfo() throws Exception { if (db instanceof FileRepository) { final FileRepository fr = (FileRepository) db; - RefWriter rw = new RefWriter(fr.getAllRefs().values()) { + RefWriter rw = new RefWriter(fr.getRefDatabase().getRefs()) { @Override protected void writeFile(String name, byte[] bin) throws IOException { @@ -852,7 +852,7 @@ public class TestRepository { for (RevObject o : tips) ow.markStart(ow.parseAny(o)); } else { - for (Ref r : db.getAllRefs().values()) + for (Ref r : db.getRefDatabase().getRefs()) ow.markStart(ow.parseAny(r.getObjectId())); } @@ -905,7 +905,7 @@ public class TestRepository { final File pack, idx; try (PackWriter pw = new PackWriter(db)) { Set all = new HashSet<>(); - for (Ref r : db.getAllRefs().values()) + for (Ref r : db.getRefDatabase().getRefs()) all.add(r.getObjectId()); pw.preparePack(m, all, PackWriter.NONE); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java index 1af37e25f..ca86d8130 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java @@ -245,7 +245,7 @@ public class PushCommandTest extends RepositoryTestCase { git.add().addFilepattern("f" + i).call(); commit = git.commit().setMessage("adding f" + i).call(); git.push().setRemote("test").call(); - git2.getRepository().getAllRefs(); + git2.getRepository().getRefDatabase().getRefs(); assertEquals("failed to update on attempt " + i, commit.getId(), git2.getRepository().resolve("refs/heads/test")); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java index 5b567d00f..bfa30d5b4 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java @@ -972,7 +972,7 @@ public class DfsGarbageCollectorTest { private static boolean isReachable(Repository repo, AnyObjectId id) throws IOException { try (RevWalk rw = new RevWalk(repo)) { - for (Ref ref : repo.getAllRefs().values()) { + for (Ref ref : repo.getRefDatabase().getRefs()) { rw.markStart(rw.parseCommit(ref.getObjectId())); } for (RevCommit next; (next = rw.next()) != null;) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java index a26ae10af..cb92a955b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java @@ -115,7 +115,7 @@ public class RevWalkUtilsReachableTest extends RevWalkTestCase { } private void assertContains(RevCommit commit, Collection refsThatShouldContainCommit) throws Exception { - Collection allRefs = db.getAllRefs().values(); + Collection allRefs = db.getRefDatabase().getRefs(); Collection sortedRefs = RefComparator.sort(allRefs); List actual = RevWalkUtils.findBranchesReachableFrom(commit, rw, sortedRefs); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java index 985393c5e..3f96d0919 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java @@ -146,7 +146,7 @@ public class DfsFsck { throws IOException { pm.beginTask(JGitText.get().countingObjects, ProgressMonitor.UNKNOWN); try (ObjectWalk ow = new ObjectWalk(repo)) { - for (Ref r : repo.getAllRefs().values()) { + for (Ref r : repo.getRefDatabase().getRefs()) { ObjectId objectId = r.getObjectId(); if (objectId == null) { // skip unborn branch