Fix create_branch in tests

This method does not need to perform a 'git init'; the repo should
already exist.

Change-Id: I5e85a76d7c0eb85a15a59f7d4b648269c016feb2
This commit is contained in:
James E. Blair 2017-09-22 10:10:19 -07:00
parent 850035eba5
commit b815c7148e
1 changed files with 1 additions and 1 deletions

View File

@ -2419,7 +2419,7 @@ class ZuulTestCase(BaseTestCase):
def create_branch(self, project, branch):
path = os.path.join(self.upstream_root, project)
repo = git.Repo.init(path)
repo = git.Repo(path)
fn = os.path.join(path, 'README')
branch_head = repo.create_head(branch)