fixbug: gitignore error after project renamed

This commit is contained in:
莘权 马 2023-12-13 22:19:55 +08:00
parent 459e9379ac
commit 88bbc75d56

View file

@ -204,6 +204,7 @@ class GitRepository:
logger.warning(f"Move {str(self.workdir)} to {str(new_path)} error: {e}")
logger.info(f"Rename directory {str(self.workdir)} to {str(new_path)}")
self._repository = Repo(new_path)
self._gitignore_rules = parse_gitignore(full_path=str(new_path / ".gitignore"))
def get_files(self, relative_path: Path | str, root_relative_path: Path | str = None, filter_ignored=True) -> List:
"""