diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-10-26 20:06:48 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-10-27 19:20:17 +0200 |
commit | 782452631651d2fbeb33b7adc12cae0c966f7cee (patch) | |
tree | c355b80bb07629687320cace9b1cf64d9cdaa1ab | |
parent | 76612cbd8d6888e2d831806ef4f4ca303199f016 (diff) |
GitRepository: use branch instead of get_branch
for readability
-rw-r--r-- | gbp/git.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |