aboutsummaryrefslogtreecommitdiffstats
path: root/modules/extensions.py
diff options
context:
space:
mode:
authorxucj98 <975114697@qq.com>2022-11-25 09:07:00 +0000
committerGitHub <noreply@github.com>2022-11-25 09:07:00 +0000
commit263b323de12eb2444b0818105575a2bc69ab0344 (patch)
tree7bc4a7802bdaba21550ad281cc08c3fc1037b074 /modules/extensions.py
parentd20dbe47e06de7f6c0e65242a04c9bb1410ef7cb (diff)
parent828438b4a190759807f9054932cae3a8b880ddf1 (diff)
downloadstable-diffusion-webui-gfx803-263b323de12eb2444b0818105575a2bc69ab0344.tar.gz
stable-diffusion-webui-gfx803-263b323de12eb2444b0818105575a2bc69ab0344.tar.bz2
stable-diffusion-webui-gfx803-263b323de12eb2444b0818105575a2bc69ab0344.zip
Merge branch 'AUTOMATIC1111:master' into draft
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():