[sysadmin-bin] git: Add get_project_branches()
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] git: Add get_project_branches()
- Date: Tue, 15 Oct 2019 12:54:52 +0000 (UTC)
commit fd2b7ae4cc02eb17764499edfd9b1dce87e3f77f
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue Oct 15 14:31:20 2019 +0200
git: Add get_project_branches()
git/git.py | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/git/git.py b/git/git.py
index 3bc1154..c3ca2a9 100644
--- a/git/git.py
+++ b/git/git.py
@@ -228,3 +228,8 @@ def get_project_head_name():
die("There was an error fetching project HEAD: %s" % e)
return branch_name
+
+def get_project_branches():
+ lines = git.branch(list=True, _split_lines=True)
+ branches = [line[2:] for line in lines]
+ return branches
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]