aboutsummaryrefslogtreecommitdiffstats
path: root/modules/extensions.py
diff options
context:
space:
mode:
authorMuhammad Rizqi Nur <rizqinur2010@gmail.com>2022-11-19 09:38:21 +0000
committerMuhammad Rizqi Nur <rizqinur2010@gmail.com>2022-11-19 09:38:21 +0000
commit8662b5e57fb66ca16237107e67af97a709457eab (patch)
tree587098ef7713725d24691554cc821b1828d708c0 /modules/extensions.py
parent45dca0562e0a68d2f92a5b6fe0412dcd8ba0659e (diff)
parentff35ae9abb0e2d680bd881e219baf6c998019a9a (diff)
downloadstable-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.py7
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():