summaryrefslogtreecommitdiffstats
path: root/g2h/git.py
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-19 19:21:11 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-19 19:21:11 +0200
commita3324b7e71ec48daab81981e7d85967a590d4f79 (patch)
treedef4a8d901d9a56047a0e63f5f3d93803c93ee87 /g2h/git.py
parentbd403e6ab18d5cc7818e86d43c3ca0b15c5e53a1 (diff)
downloadgit2hugo-a3324b7e71ec48daab81981e7d85967a590d4f79.tar.gz
g2h: Add utility script
Also move the sources into the more conventional src/g2h dir
Diffstat (limited to 'g2h/git.py')
-rw-r--r--g2h/git.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/g2h/git.py b/g2h/git.py
deleted file mode 100644
index 283135c..0000000
--- a/g2h/git.py
+++ /dev/null
@@ -1,23 +0,0 @@
-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_branches(self):
- return self.repo.branches
-
- def get_commits(self):
- return list(self.repo.iter_commits())
-
- def get_head(self):
- return self.repo.head.commit
-
- def get_repo(self):
- return self.repo
-
- def get_tags(self):
- return self.repo.tags