aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-11-26 17:22:36 +0100
committerGuido Guenther <agx@sigxcpu.org>2007-11-26 17:22:36 +0100
commit9c352b8d02f4c585f3c4dc1a64a20a1d9e5c8190 (patch)
treecff46a6073060dc987dfabb4f82483b8f98c5263
parent818eb98b09236225d004811ad8a6b5dbbb1fae0b (diff)
fix "gpb gets confused by color enabled on branches..." - thanks to Niv SardiĀ for the patch (Closes: #452921)
-rw-r--r--gbp/git_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/git_utils.py b/gbp/git_utils.py
index 9cfb0ec5..2ad4235c 100644
--- a/gbp/git_utils.py
+++ b/gbp/git_utils.py
@@ -41,7 +41,7 @@ class GitRepository(object):
def has_branch(self, branch):
"""check if the repository has branch 'branch'"""
self.__check_path()
- for line in self.__git_getoutput('branch')[0]:
+ for line in self.__git_getoutput('branch', [ '--no-color' ])[0]:
if line.split(' ', 1)[1].strip() == branch:
return True
return False
@@ -57,7 +57,7 @@ class GitRepository(object):
def get_branch(self):
"""on what branch is the current working copy"""
self.__check_path()
- for line in self.__git_getoutput('branch')[0]:
+ for line in self.__git_getoutput('branch', [ '--no-color' ])[0]:
if line.startswith('*'):
return line.split(' ', 1)[1].strip()