From b9670821a99f2de035c8a6d4e894335e23dc9a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Fri, 17 May 2024 20:05:54 +0200 Subject: [PATCH] Only init the repository if it doesn't exist already harmless, but avoids a scary warning --- lib/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/git.py b/lib/git.py index 15f802e..0880e5d 100644 --- a/lib/git.py +++ b/lib/git.py @@ -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"""