Silence GitRepository.set_upstream_branch
authorGuido Günther <agx@sigxcpu.org>
Fri, 26 Apr 2013 22:00:06 +0000 (00:00 +0200)
committerGuido Günther <agx@sigxcpu.org>
Fri, 26 Apr 2013 22:00:06 +0000 (00:00 +0200)
It's not used within gbp itself so no command line tool expects
an error message to be printed.

gbp/git/repository.py

index c2d3baa..1c8ea9c 100644 (file)
@@ -522,8 +522,8 @@ class GitRepository(object):
             if not self.has_branch(branch, remote=remote):
                 raise GitRepositoryError("Branch %s doesn't exist!" % branch)
 
-            self._git_getoutput('branch', ["--set-upstream", local_branch, upstream])
-
+            self._git_inout('branch', ["--set-upstream", local_branch, upstream],
+                            capture_stderr=True)
 
     def get_upstream_branch(self, local_branch):
         """