[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.
This commit is contained in:
Julia Beliaeva
2017-06-04 23:57:54 +03:00
committed by Julia Beliaeva
parent 9269c2eff4
commit 9a4acf4b73
@@ -305,9 +305,15 @@ public class VcsLogPathsIndex extends VcsLogFullDetailsIndex<List<VcsLogPathsInd
}
else {
int beforeId = myPathsEnumerator.enumerate(beforePath);
data.add(new ChangeData(ChangeKind.RENAMED_TO, beforeId));
List<ChangeData> 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<ChangeData> beforeData = fillDataWithNulls(result, parent, beforeId);
beforeData.add(new ChangeData(ChangeKind.RENAMED_FROM, afterId));
}
}
}