summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-10-26 20:06:48 +0200
committerGuido Günther <agx@sigxcpu.org>2011-10-27 19:20:17 +0200
commit782452631651d2fbeb33b7adc12cae0c966f7cee (patch)
treec355b80bb07629687320cace9b1cf64d9cdaa1ab
parent76612cbd8d6888e2d831806ef4f4ca303199f016 (diff)
GitRepository: use branch instead of get_branch
for readability
-rw-r--r--gbp/git.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/git.py b/gbp/git.py
index d8ba6e8..17e2fe3 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -429,7 +429,7 @@ class GitRepository(object):
@param branch: name of the branch to switch to
"""
- if self.get_branch() == branch:
+ if self.branch == branch:
return
if self.bare:
@@ -464,7 +464,7 @@ class GitRepository(object):
args = [ "-D" ]
args += [ "-r" ] if remote else []
- if self.get_branch() != branch:
+ if self.branch != branch:
self._git_command("branch", args + [branch])
else:
raise GitRepositoryError, "Can't delete the branch you're on"
@@ -511,7 +511,7 @@ class GitRepository(object):
@rtype: bool
"""
# an empty repo has no branches:
- if self.get_branch():
+ if self.branch:
return False
else:
return True