import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Predicate;
+import java.util.function.Function;
+import java.util.stream.Collectors;
import org.eclipse.jgit.events.ListenerHandle;
import org.eclipse.jgit.events.RefsChangedListener;
}
Map<String, Ref> refs = diskRepo.getRefDatabase()
- .getRefs(RefDatabase.ALL);
+ .getRefsByPrefix(RefDatabase.ALL).stream()
+ .collect(Collectors.toMap(Ref::getName, Function.identity()));
Ref actualHead = refs.remove(Constants.HEAD);
if (actualHead != null) {
String actualLeafName = actualHead.getLeaf().getName();