mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
feat: Expand gitignore patterns to include editor temp files
This commit is contained in:
parent
3fcbf1a43f
commit
9eb938fd6f
1 changed files with 18 additions and 2 deletions
|
@ -70,8 +70,24 @@ def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]:
|
|||
if not gitignore_paths:
|
||||
return None
|
||||
|
||||
# expand this set of patterns to include all manner of text editor temp files like .bak, ...~, etc ai!
|
||||
patterns = [".aider*", ".git"] # Always ignore
|
||||
patterns = [
|
||||
".aider*",
|
||||
".git",
|
||||
# Common editor backup/temp files
|
||||
"*~", # Emacs/vim backup
|
||||
"*.bak", # Generic backup
|
||||
"*.swp", # Vim swap
|
||||
"*.swo", # Vim swap
|
||||
"#*#", # Emacs auto-save
|
||||
".#*", # Emacs lock files
|
||||
"*.tmp", # Generic temp files
|
||||
"*.temp", # Generic temp files
|
||||
"*.orig", # Merge conflict originals
|
||||
"*.pyc", # Python bytecode
|
||||
"__pycache__/", # Python cache dir
|
||||
".DS_Store", # macOS metadata
|
||||
"Thumbs.db", # Windows thumbnail cache
|
||||
] # Always ignore
|
||||
for path in gitignore_paths:
|
||||
if path.exists():
|
||||
with open(path) as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue