diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-08-24 12:53:59 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-08-24 12:53:59 +0200 |
| commit | 782a350e1f56292176ac8471195c889e47b2b841 (patch) | |
| tree | 441c689e1a638472fb1e090f2f0888c2ecd54372 /g2h/git.py | |
| parent | 978703ebc86060555da3df4c376e37d16aecce29 (diff) | |
| download | git2hugo-782a350e1f56292176ac8471195c889e47b2b841.tar.gz | |
g2h:Add branches, tags and project name to overview page
Diffstat (limited to 'g2h/git.py')
| -rw-r--r-- | g2h/git.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -9,3 +9,9 @@ class Git: def get_all_commits(self): return list(self.repo.iter_commits()) + + def get_branches(self): + return sorted(self.repo.branches, key=lambda b: b.commit.committed_date, reverse=True) + + def get_tags(self): + return sorted(self.repo.tags, key=lambda b: b.commit.committed_date, reverse=True) |