From e4ba1fc772b2ed50fb5f7b469fa30b8915479416 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Sat, 23 Aug 2025 22:40:20 +0200 Subject: g2h: Add jinja and git basic flow --- g2h/git.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 g2h/git.py (limited to 'g2h/git.py') diff --git a/g2h/git.py b/g2h/git.py new file mode 100644 index 0000000..e6984c4 --- /dev/null +++ b/g2h/git.py @@ -0,0 +1,11 @@ +import git + +class Git: + def __init__(self, repo_path): + try: + self.repo = git.Repo(repo_path) + except git.InvalidGitRepositoryError: + raise ValueError(f"Invalid git repository at {repo_path}") + + def get_all_commits(self): + return list(self.repo.iter_commits()) -- cgit v1.2.3