diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java index 2d1aca8de..e594e528b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java @@ -1161,12 +1161,14 @@ public Ref peel(Ref ref) { * Get a map with all objects referenced by a peeled ref. * * @return a map with all objects referenced by a peeled ref. + * @throws IOException */ @NonNull - public Map> getAllRefsByPeeledObjectId() { - Map allRefs = getAllRefs(); + public Map> getAllRefsByPeeledObjectId() + throws IOException { + List allRefs = getRefDatabase().getRefs(); Map> ret = new HashMap<>(allRefs.size()); - for (Ref ref : allRefs.values()) { + for (Ref ref : allRefs) { ref = peel(ref); AnyObjectId target = ref.getPeeledObjectId(); if (target == null) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java index b4ccfe0ae..058233865 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java @@ -121,7 +121,7 @@ public RevCommit next() throws MissingObjectException, return pc; } - private Ref[] getRefs(AnyObjectId commitId) { + private Ref[] getRefs(AnyObjectId commitId) throws IOException { if (reverseRefMap == null) { reverseRefMap = repository.getAllRefsByPeeledObjectId(); for (Map.Entry> entry : additionalRefMap