diff --git a/dump_things_service/audit/gitaudit.py b/dump_things_service/audit/gitaudit.py index 4302680..926babc 100644 --- a/dump_things_service/audit/gitaudit.py +++ b/dump_things_service/audit/gitaudit.py @@ -67,9 +67,9 @@ class GitAuditBackend(AuditBackend): auto_flush_timeout: int = 60, ): self.path = path - self.index_path = None - self.cached_index_entries = [] - self.current_change_set = {} + self.index_path: Path | None = None + self.cached_index_entries: list[str] = [] + self.current_change_set: dict[Path, str] = {} self.lock = Lock() self.last_flush_time = 0 if auto_flush_timeout < 1: @@ -328,6 +328,10 @@ class GitAuditBackend(AuditBackend): if is_empty: call_git(['init', '--bare', str(self.path)], capture_output=True) self.repo = Repo(self.path) + call_git(['config', 'user.name', 'dump-things-service'], cwd=self.path) + call_git( + ['config', 'user.email', 'dump-things-service@localhost'], cwd=self.path + ) apply_changeset( self.repo, {'README.txt': 'A git-based audit backend\n'},