diff options
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 9a0256b..11aff4f 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -337,8 +337,9 @@ class GitRepository(object): ref = 'refs/remotes/%s' % branch else: ref = 'refs/heads/%s' % branch - failed = self._git_getoutput('show-ref', [ ref ])[1] - if failed: + try: + self._git_command('show-ref', [ ref ]) + except GitRepositoryError: return False return True |