Only init the repository if it doesn't exist already

harmless, but avoids a scary warning
This commit is contained in:
Dirk Müller 2024-05-17 20:05:54 +02:00
parent 073550825c
commit b9670821a9
No known key found for this signature in database

View File

@ -46,7 +46,8 @@ class Git:
)
def open(self):
self.git_run(["init", "--object-format=sha256", "-b", "factory"])
if not self.exists():
self.git_run(["init", "--object-format=sha256", "-b", "factory"])
def is_dirty(self):
"""Check if there is something to commit"""