fix fallback to master branch
This commit is contained in:
parent
2932ea50e3
commit
57702114b0
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ class ApplyPatch:
|
|||
commit = self.repo.commit(base_revision)
|
||||
except Exception as e:
|
||||
logging.info('Cannot resolve revision {}: {}, going to use "master" instead.'.format(base_revision, e))
|
||||
commit = self.repo.heads['master']
|
||||
commit = self.repo.heads['master'].commit
|
||||
logging.info(f'creating branch {self.branch_name} at {commit.hexsha}')
|
||||
new_branch = self.repo.create_head(self.branch_name, commit.hexsha)
|
||||
self.repo.head.reference = new_branch
|
||||
|
|
Loading…
Reference in a new issue