[vcs-log] deal with theoretical possibility of having no visible branches or head tags for a root EA-86545

This commit is contained in:
Julia Beliaeva
2016-08-03 15:35:30 +03:00
parent 8791f08336
commit 46ee6dee35
@@ -91,8 +91,9 @@ public class FakeVisiblePackBuilder {
Map<VirtualFile, Set<VcsRef>> map = VcsLogUtil.groupRefsByRoot(branchesAndHeads);
Map<VirtualFile, CompressedRefs> refs = ContainerUtil.newHashMap();
for (VirtualFile root : map.keySet()) {
refs.put(root, new CompressedRefs(map.get(root), myHashMap));
for (VirtualFile root : providers.keySet()) {
Set<VcsRef> refsForRoot = map.get(root);
refs.put(root, new CompressedRefs(refsForRoot == null ? ContainerUtil.newHashSet() : refsForRoot, myHashMap));
}
return new RefsModel(refs, heads, myHashMap, providers);
}