mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
do not cache aiderignore
This commit is contained in:
parent
cf00037442
commit
d1cd0f9860
1 changed files with 5 additions and 9 deletions
|
@ -206,15 +206,11 @@ class GitRepo:
|
||||||
if not self.aider_ignore_file or not self.aider_ignore_file.is_file():
|
if not self.aider_ignore_file or not self.aider_ignore_file.is_file():
|
||||||
return fnames
|
return fnames
|
||||||
|
|
||||||
mtime = self.aider_ignore_file.stat().st_mtime_ns
|
lines = self.aider_ignore_file.read_text().splitlines()
|
||||||
|
self.aider_ignore_spec = pathspec.PathSpec.from_lines(
|
||||||
if mtime != self.aider_ignore_ts:
|
pathspec.patterns.GitWildMatchPattern,
|
||||||
self.aider_ignore_ts = mtime
|
lines,
|
||||||
lines = self.aider_ignore_file.read_text().splitlines()
|
)
|
||||||
self.aider_ignore_spec = pathspec.PathSpec.from_lines(
|
|
||||||
pathspec.patterns.GitWildMatchPattern,
|
|
||||||
lines,
|
|
||||||
)
|
|
||||||
|
|
||||||
return [fname for fname in fnames if not self.aider_ignore_spec.match_file(fname)]
|
return [fname for fname in fnames if not self.aider_ignore_spec.match_file(fname)]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue