From 3d7b0972ddfaf385573249106be44f2322566a47 Mon Sep 17 00:00:00 2001 From: Max Value Date: Tue, 17 Dec 2024 11:38:53 +0000 Subject: [PATCH] Git not owning repo fix --- blog.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog.py b/blog.py index f8bcf57..7a2d6cd 100755 --- a/blog.py +++ b/blog.py @@ -15,6 +15,9 @@ md = markdown.Markdown(extensions = ['meta', 'tables', 'footnotes', TocExtension blog_path = environ["BLOG_PATH"] +repo = Repo.init(blog_path) +repo.config_writer().set_value("safe", "directory", blog_path).release() + class Page(): def __init__( self, @@ -94,7 +97,6 @@ def get_metadata(file_name: str): return title, abstract, keywords def get_history(n): - repo = Repo.init(blog_path) commits = list(repo.iter_commits("main", max_count=n)) commits_string = "" for c in commits: -- 2.39.2