diff options
author | Maiko Tan <maiko.tan.coding@gmail.com> | 2022-11-19 12:13:07 +0000 |
---|---|---|
committer | Maiko Tan <maiko.tan.coding@gmail.com> | 2022-11-19 12:13:07 +0000 |
commit | 336c341a7c3fe81cdf0fc45616ed0c16c79a2c6f (patch) | |
tree | 6760fd7f15a9049365a1ee2c56de37dd456504bd /modules/extensions.py | |
parent | 8f2ff861d31972d12de278075ea9c0c0deef99de (diff) | |
parent | 84a6f211d407cd748c603edc3a81862488505c24 (diff) | |
download | stable-diffusion-webui-gfx803-336c341a7c3fe81cdf0fc45616ed0c16c79a2c6f.tar.gz stable-diffusion-webui-gfx803-336c341a7c3fe81cdf0fc45616ed0c16c79a2c6f.tar.bz2 stable-diffusion-webui-gfx803-336c341a7c3fe81cdf0fc45616ed0c16c79a2c6f.zip |
Merge branch 'master' into api-authorization
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():
|