diff --git a/CHANGELOG.md b/CHANGELOG.md index 768f6260..48beba24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Status of the `main` branch. Changes prior to the next official version change w * General: - Support `serena --version` CLI command for displaying the current version #1347 + - Fix: Check for ignored path ignored `.git` folder only at the top level, not in every subdirectory (`Project._is_ignored_relative_path`) #1350 # v1.1.2 (2026-04-14) diff --git a/src/serena/project.py b/src/serena/project.py index a20623e3..6f1cec43 100644 --- a/src/serena/project.py +++ b/src/serena/project.py @@ -448,7 +448,7 @@ class Project(ToStringMixin): rel_path = Path(relative_path) # always ignore paths inside .git - if len(rel_path.parts) > 0 and rel_path.parts[0] == ".git": + if len(rel_path.parts) > 0 and ".git" in rel_path.parts: return True return match_path(str(relative_path), self._ignore_spec, root_path=self.project_root)