summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-07-04 17:45:54 +0200
committerGuido Günther <agx@sigxcpu.org>2013-07-04 17:51:58 +0200
commit7762b17e1583356f9ba7e4484dd474c988dba12c (patch)
treeb78018bec88c7c53520b422c00b48820fe8d414e
parenta22eee2325eae7d44110e4f80e5cf3dc0f3b1d9d (diff)
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.
-rw-r--r--gbp/git/repository.py4
1 files 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):
"""