Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java
index 5acd9e1a04..ab4dd67805 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java
@@ -16,6 +16,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -89,14 +90,9 @@ public class BranchHierarchyNode extends RepositoryTreeNode<IPath> {
* @throws IOException
*/
public List<Ref> getChildRefsRecursive() throws IOException {
- List<Ref> childRefs = new ArrayList<>();
- for (IPath myPath : getPathList()) {
- if (getObject().isPrefixOf(myPath)) {
- Ref ref = getRepository().exactRef(myPath.toPortableString());
- childRefs.add(ref);
- }
- }
- return childRefs;
+ return getRepository().getRefDatabase()
+ .getRefsByPrefix(getObject().toPortableString()).stream()
+ .filter(ref -> !ref.isSymbolic()).collect(Collectors.toList());
}
private List<IPath> getPathList() throws IOException {

Back to the top