summaryrefslogtreecommitdiff
path: root/gbp/git
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-07-03 21:49:05 +0200
committerGuido Günther <agx@sigxcpu.org>2012-07-03 21:51:08 +0200
commitd3ee4b0cb3fdbf06aac954eeb50715c74705b9b7 (patch)
treea8c055cd55c1cc345ac349cc2a39fd130333f64c /gbp/git
parent4d56ab643100776171a66bff9686ff7f676ad1c5 (diff)
GitRepository: Make rev_parse's short option an int everywhere
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 5d33fc7..c04bbc5 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -602,7 +602,7 @@ class GitRepository(object):
# an empty repo has no branches:
return False if self.branch else True
- def rev_parse(self, name, short=None):
+ def rev_parse(self, name, short=0):
"""
Find the SHA1 of a given name
@@ -614,7 +614,7 @@ class GitRepository(object):
@rtype: C{str}
"""
args = GitArgs("--quiet", "--verify")
- args.add_cond(short, '--short=%s' % short)
+ args.add_cond(short, '--short=%d' % short)
args.add(name)
sha, ret = self._git_getoutput('rev-parse', args.args)
if ret: