diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2010-08-19 13:37:31 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-09-17 19:53:40 +0200 |
commit | cdaaa0a93a4083045941dc73e3e972b1919de4b1 (patch) | |
tree | d9bbc5a51502987db58af57757d8f3fdded240ff /gbp | |
parent | efaf88c2aee5cbce71b3149124da1c6462e6f297 (diff) |
Allow passing --quiet to git show.
Git-Dch: Ignore
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/git.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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() |