Skip to content
代码片段 群组 项目
提交 07f6a1a6 编辑于 作者: comfyanonymous's avatar comfyanonymous
浏览文件

Handle case in the updater when master branch is not in local repo.

上级 e746965c
No related branches found
No related tags found
无相关合并请求
......@@ -62,8 +62,15 @@ except:
print("checking out master branch")
branch = repo.lookup_branch('master')
ref = repo.lookup_reference(branch.name)
repo.checkout(ref)
if branch is None:
ref = repo.lookup_reference('refs/remotes/origin/master')
repo.checkout(ref)
branch = repo.lookup_branch('master')
if branch is None:
repo.create_branch('master', repo.get(ref.target))
else:
ref = repo.lookup_reference(branch.name)
repo.checkout(ref)
print("pulling latest changes")
pull(repo)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册