summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <g.guenther@tarent.de>2011-10-28 13:29:57 +0200
committerGuido Günther <agx@sigxcpu.org>2011-10-28 18:49:30 +0200
commit27a921eefd474dd7fed0abed8c3667aa4e1bcaa2 (patch)
tree3c4b9ff1b1302e456409642d0a533bb0ba2f20b6
parent3d80c335ecbac1db0826d9d5d03fe36b92ccf62d (diff)
GitRepository: simplify is_empty
Git-Dch: Ignore
-rw-r--r--gbp/git.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/gbp/git.py b/gbp/git.py
index d4192f0..43e5388 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -563,14 +563,11 @@ class GitRepository(object):
Is the repository empty?
@return: True if the repositorydoesn't have any commits,
- False otherwise
+ False otherwise
@rtype: C{bool}
"""
# an empty repo has no branches:
- if self.branch:
- return False
- else:
- return True
+ return False if self.branch else True
def rev_parse(self, name):
"""