"ppocr/vscode:/vscode.git/clone" did not exist on "2a477c85755957d182abfea96986343a56ac5c36"
Commit 07f6a1a6 authored by comfyanonymous's avatar comfyanonymous
Browse files

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

parent e746965c
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment