git_deploy: refresh previously corrupt repos

It is possible that the user manually corrected a corrupt repo.
If a repo makes it past initialization reset the corrupt flag.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-10-22 19:03:48 -04:00
parent 1a3689cb7d
commit 779997c2b8
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 2 additions and 2 deletions

View File

@ -401,6 +401,8 @@ class GitRepo:
raise
else:
self.initialized = True
# If no exception was raised assume the repo is not corrupt
self.repo_corrupt = False
finally:
self.init_evt.set()
self.init_evt = None
@ -571,8 +573,6 @@ class GitRepo:
async def update_repo_status(self) -> bool:
async with self.git_operation_lock:
self.valid_git_repo = False
if self.repo_corrupt:
return False
if not self.git_path.joinpath(".git").exists():
logging.info(
f"Git Repo {self.alias}: path '{self.git_path}'"