From 9a4acf4b7303ad4fff9bc036a4579da183bdb9e2 Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Wed, 31 May 2017 04:39:28 +0300 Subject: [PATCH] [vcs-log] write case-only rename on case insensitive file systems to the log as modified Since id for paths different in only in case is the same in case insensitive file systems, index should not treat case-only renames as renames. --- .../vcs/log/data/index/VcsLogPathsIndex.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogPathsIndex.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogPathsIndex.java index aebfba3c30b5..899713a03e5b 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogPathsIndex.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogPathsIndex.java @@ -305,9 +305,15 @@ public class VcsLogPathsIndex extends VcsLogFullDetailsIndex beforeData = fillDataWithNulls(result, parent, beforeId); - beforeData.add(new ChangeData(ChangeKind.RENAMED_FROM, afterId)); + if (beforeId == afterId && !SystemInfo.isFileSystemCaseSensitive) { + // case only rename in case insensitive file system + // since ids for before and after paths are the same we just treating this rename as a modification + data.add(new ChangeData(ChangeKind.MODIFIED, -1)); + } else { + data.add(new ChangeData(ChangeKind.RENAMED_TO, beforeId)); + List beforeData = fillDataWithNulls(result, parent, beforeId); + beforeData.add(new ChangeData(ChangeKind.RENAMED_FROM, afterId)); + } } }