summaryrefslogtreecommitdiffhomepage
path: root/gbp/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/git.py')
-rw-r--r--gbp/git.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gbp/git.py b/gbp/git.py
index 60914885..7743bdd1 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -221,6 +221,12 @@ class GitRepository(object):
name = os.getenv("GIT_AUTHOR_NAME", name)
return (name, email)
+ def get_remotes(self):
+ """Get all remote branches"""
+ args = [ '--format=%(refname:short)', 'refs/remotes/' ]
+ out = self.__git_getoutput('for-each-ref', args)[0]
+ return [ ref.strip() for ref in out ]
+
class FastImport(object):
"""Invoke git-fast-import"""