From 87d0a7bd6c9682ebd88f50a736e2891cf9802ab2 Mon Sep 17 00:00:00 2001 From: Liudmila Kornilova Date: Tue, 10 Feb 2026 15:59:40 +0100 Subject: [PATCH] IJPL-233675 Register created dir in LVCS non-recursively GitOrigin-RevId: f8936878d46109386258b239b2af3652e24daf64 --- .../history/integration/LocalHistoryEventDispatcher.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryEventDispatcher.kt b/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryEventDispatcher.kt index a2f7a42eb38d..d72ad5d0742f 100644 --- a/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryEventDispatcher.kt +++ b/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryEventDispatcher.kt @@ -67,6 +67,14 @@ internal class LocalHistoryEventDispatcher(private val facade: LocalHistoryFacad true }, VirtualFileFilter { file -> isVersioned(file) }) } + + val inContent = IdeaGateway.getVersionedFilterData().myProjectFileIndices.any { it.isInContent(dir) } + + if (!inContent && isVersioned(dir)) { + // Non-recursively register this file or directory if it's outside project roots but is versioned. + // (recursive iteration would load files into VFS, we don't want it) + facade.created(gateway.getPathOrUrl(dir), dir.isDirectory) + } } private fun beforeContentsChange(e: VFileContentChangeEvent) {