From 6bbf3d2004133252cd0e2d057add5c1431dc8511 Mon Sep 17 00:00:00 2001 From: doodleEsc Date: Wed, 2 Jul 2025 12:17:41 +0800 Subject: [PATCH] refactor: remove redundant pathspec check (#2384) --- py/rag-service/src/main.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/py/rag-service/src/main.py b/py/rag-service/src/main.py index c7bf1ac..1fa3853 100644 --- a/py/rag-service/src/main.py +++ b/py/rag-service/src/main.py @@ -682,10 +682,6 @@ def get_pathspec(directory: Path) -> pathspec.PathSpec | None: patterns = get_gitignore_files(directory) patterns.extend(get_gitcrypt_files(directory)) - # Return None if no patterns were found - if len(patterns) <= 1: # Only .git/ is in the list - return None - return pathspec.GitIgnoreSpec.from_lines(patterns)