aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2010-08-19 13:37:31 +0200
committerGuido Günther <agx@sigxcpu.org>2010-09-17 19:53:40 +0200
commitcdaaa0a93a4083045941dc73e3e972b1919de4b1 (patch)
treed9bbc5a51502987db58af57757d8f3fdded240ff /gbp
parentefaf88c2aee5cbce71b3149124da1c6462e6f297 (diff)
Allow passing --quiet to git show.
Git-Dch: Ignore
Diffstat (limited to 'gbp')
-rw-r--r--gbp/git.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gbp/git.py b/gbp/git.py
index 9d5a3181..917333a4 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -291,9 +291,12 @@ class GitRepository(object):
raise GitRepositoryError, "can't find tag for %s" % commit
return tag[0].strip()
- def rev_parse(self, name):
+ def rev_parse(self, name, quiet=False):
"find the SHA1"
- sha, ret = self.__git_getoutput('rev-parse', [ "--verify", name])
+ args = [ "--verify", name]
+ if quiet:
+ args.insert(0, "--quiet")
+ sha, ret = self.__git_getoutput('rev-parse', args)
if ret:
raise GitRepositoryError, "can't find SHA1 for %s" % name
return sha[0].strip()