summaryrefslogtreecommitdiffstats
path: root/g2h/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'g2h/git.py')
-rw-r--r--g2h/git.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/g2h/git.py b/g2h/git.py
index e6984c4..9f3bba8 100644
--- a/g2h/git.py
+++ b/g2h/git.py
@@ -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)