From 09642a0ada44a818cd1f5cdfce01da99efe97e0f Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Sat, 7 Feb 2015 21:55:40 +0300 Subject: [PATCH] [vcs-log][linear-bek] a very long edge can come from a tail --- .../vcs/log/graph/linearBek/LinearBekGraphBuilder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/linearBek/LinearBekGraphBuilder.java b/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/linearBek/LinearBekGraphBuilder.java index 20125f04cf86..4fac28a657d5 100644 --- a/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/linearBek/LinearBekGraphBuilder.java +++ b/platform/vcs-log/graph/src/com/intellij/vcs/log/graph/linearBek/LinearBekGraphBuilder.java @@ -101,10 +101,12 @@ class LinearBekGraphBuilder { while (!queue.isEmpty()) { GraphEdge nextEdge = queue.poll(); Integer next = nextEdge.getDownNodeIndex(); - if (next == null) continue; // allow very long edges down - Integer upNodeIndex = nextEdge.getUpNodeIndex(); assert upNodeIndex != null; // can not happen + if (next == null) { + fragment.addTail(upNodeIndex); + continue; // allow very long edges down + } if (next == firstChild) { // found first child