diff --git a/src/Shared/FileMatcher.cs b/src/Shared/FileMatcher.cs
index 400de67a5d3..f919db321d4 100644
--- a/src/Shared/FileMatcher.cs
+++ b/src/Shared/FileMatcher.cs
@@ -796,7 +796,9 @@ bool needsRecursion
public string Filespec { get; }
///
/// Holds the directory pattern for globs like **/{pattern}/**, i.e. when we're looking for a matching directory name
- /// regardless of where on the path it is.
+ /// regardless of where on the path it is. This field is used only if the wildcard directory part has this shape. In
+ /// other cases such as **/{pattern1}/**/{pattern2}/**, we don't use this optimization and instead rely on
+ /// to test if a file path matches the glob or not.
///
public string DirectoryPattern { get; }
///