From 176bb1b412617ebaf3cf0937edaf28ee8a79676c Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Wed, 24 May 2017 21:46:48 +0300 Subject: [PATCH] [file-history] even if file has no renames, still need to run refiner to skip trivial merges --- .../vcs/log/history/FileHistoryFilterer.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryFilterer.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryFilterer.java index a3791225250f..7f0511a64b9f 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryFilterer.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryFilterer.java @@ -79,9 +79,8 @@ class FileHistoryFilterer extends VcsLogFilterer { IndexDataGetter.FileNamesData namesData = ((FilteredByFileResult)filterResult).fileNamesData; Map pathsMap = null; - if (namesData.hasRenames() && visibleGraph.getVisibleCommitCount() > 0) { + if (visibleGraph.getVisibleCommitCount() > 0) { if (visibleGraph instanceof VisibleGraphImpl) { - int row = getCurrentRow(dataPack, visibleGraph, namesData); if (row >= 0) { FileHistoryRefiner refiner = new FileHistoryRefiner((VisibleGraphImpl)visibleGraph, namesData); @@ -191,8 +190,13 @@ class FileHistoryFilterer extends VcsLogFilterer { } public boolean refine(int row, @NotNull FilePath startPath) { - myPaths.push(startPath); - DfsUtil.walk(LinearGraphUtils.asLiteLinearGraph(myVisibleGraph.getLinearGraph()), row, this); + if (myNamesData.hasRenames()) { + myPaths.push(startPath); + DfsUtil.walk(LinearGraphUtils.asLiteLinearGraph(myVisibleGraph.getLinearGraph()), row, this); + } + else { + myPathsForCommits.putAll(myNamesData.buildPathsMap()); + } for (int commit : myPathsForCommits.keySet()) { FilePath path = myPathsForCommits.get(commit);