Ignore files from .gitignore in Git loader (#2909)

fixes #2905 

extends #2851
fix_agent_callbacks
Kwuang Tang 1 year ago committed by GitHub
parent 7ee87eb0c8
commit 66bef1d7ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,6 +54,10 @@ class GitLoader(BaseLoader):
file_path = os.path.join(self.repo_path, item.path)
ignored_files = repo.ignored([file_path])
if len(ignored_files):
continue
# uses filter to skip files
if self.file_filter and not self.file_filter(file_path):
continue

Loading…
Cancel
Save