Which causes the wrong upstream branch name to be used.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
remotename = 'origin' if 'origin' in remotes else remotes.keys()[0]
# Take the remote repo of current branch, if available
try:
- upstream_branch = repo.get_upstream_branch(repo.branch)
- if upstream_branch:
- remotename = upstream_branch.split("/")[0]
+ remote_branch = repo.get_upstream_branch(repo.branch)
+ if remote_branch:
+ remotename = remote_branch.split("/")[0]
except GitRepositoryError:
pass
reponame = urlparse(remotes[remotename][0]).path[1:]