Skip to content

Commit 338d9ae

Browse files
Make portable updater work with repos in unmerged state. (Comfy-Org#11281)
1 parent eeb020b commit 338d9ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.ci/update_windows/update.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ def pull(repo, remote_name='origin', branch='master'):
5353
repo.stash(ident)
5454
except KeyError:
5555
print("nothing to stash") # noqa: T201
56+
except:
57+
print("Could not stash, cleaning index and trying again.") # noqa: T201
58+
repo.state_cleanup()
59+
repo.index.read_tree(repo.head.peel().tree)
60+
repo.index.write()
61+
try:
62+
repo.stash(ident)
63+
except KeyError:
64+
print("nothing to stash.") # noqa: T201
65+
5666
backup_branch_name = 'backup_branch_{}'.format(datetime.today().strftime('%Y-%m-%d_%H_%M_%S'))
5767
print("creating backup branch: {}".format(backup_branch_name)) # noqa: T201
5868
try:

0 commit comments

Comments
 (0)