mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-15 02:17:26 +00:00
Always ignore paths in .git
This commit is contained in:
1 parent
25139d1d74
commit
81615c4176
2 files changed
+9
No files matched your search
@@ -2,6 +2,9 @@
|
||||
|
||||
Status of the `main` branch. Changes prior to the next official version change will appear here.
|
||||
|
||||
Fixes:
|
||||
* Ignore `.git` in check for ignored paths and improve performance of `find_all_non_ignored_files`
|
||||
|
||||
# 0.1.3
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -3,6 +3,7 @@ import logging
|
||||
import os
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import NamedTuple
|
||||
|
||||
import pathspec
|
||||
@@ -258,6 +259,11 @@ class GitignoreParser:
|
||||
else:
|
||||
rel_path = path
|
||||
|
||||
# Ignore paths inside .git
|
||||
rel_path_first_path = Path(rel_path).parts[0]
|
||||
if rel_path_first_path == ".git":
|
||||
return True
|
||||
|
||||
abs_path = os.path.join(self.repo_root, rel_path)
|
||||
|
||||
# Normalize path separators
|
||||
|
||||
Reference in new issue
Block a user