diff options
author | Muhammad Rizqi Nur <rizqinur2010@gmail.com> | 2022-11-19 09:38:21 +0000 |
---|---|---|
committer | Muhammad Rizqi Nur <rizqinur2010@gmail.com> | 2022-11-19 09:38:21 +0000 |
commit | 8662b5e57fb66ca16237107e67af97a709457eab (patch) | |
tree | 587098ef7713725d24691554cc821b1828d708c0 /modules/extensions.py | |
parent | 45dca0562e0a68d2f92a5b6fe0412dcd8ba0659e (diff) | |
parent | ff35ae9abb0e2d680bd881e219baf6c998019a9a (diff) | |
download | stable-diffusion-webui-gfx803-8662b5e57fb66ca16237107e67af97a709457eab.tar.gz stable-diffusion-webui-gfx803-8662b5e57fb66ca16237107e67af97a709457eab.tar.bz2 stable-diffusion-webui-gfx803-8662b5e57fb66ca16237107e67af97a709457eab.zip |
Merge branch 'a1111' into vae-fix-none
Diffstat (limited to 'modules/extensions.py')
-rw-r--r-- | modules/extensions.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/extensions.py b/modules/extensions.py index 94ce479a..db9c4200 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -65,9 +65,12 @@ class Extension: self.can_update = False
self.status = "latest"
- def pull(self):
+ def fetch_and_reset_hard(self):
repo = git.Repo(self.path)
- repo.remotes.origin.pull()
+ # Fix: `error: Your local changes to the following files would be overwritten by merge`,
+ # because WSL2 Docker set 755 file permissions instead of 644, this results to the error.
+ repo.git.fetch('--all')
+ repo.git.reset('--hard', 'origin')
def list_extensions():
|