From 7762b17e1583356f9ba7e4484dd474c988dba12c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Thu, 4 Jul 2013 17:45:54 +0200 Subject: [PATCH] GitRepository.set_upstream_branch: don't try to set upstream twice Move setting of the upstream branch out of the loop. This worked by accident. --- gbp/git/repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 11aff4fd..e172aad6 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -538,8 +538,8 @@ class GitRepository(object): if not self.has_branch(branch, remote=remote): raise GitRepositoryError("Branch %s doesn't exist!" % branch) - self._git_inout('branch', ["--set-upstream", local_branch, upstream], - capture_stderr=True) + self._git_inout('branch', ["--set-upstream", local_branch, upstream], + capture_stderr=True) def get_upstream_branch(self, local_branch): """ -- 2.34.1