aboutsummaryrefslogtreecommitdiffstats
path: root/modules/launch_utils.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-13 17:28:49 +0000
committerGitHub <noreply@github.com>2023-08-13 17:28:49 +0000
commit9cd0475c0823abc289125e4095b0ba5256f71538 (patch)
tree465aa091d5302761c39455049d3aca0d2b83c817 /modules/launch_utils.py
parent8452708560586e2d5047c7d8df2b4ba642d94dac (diff)
parent2035cbbd5d6e7678450c701fce1a5de7d8bd7084 (diff)
downloadstable-diffusion-webui-gfx803-9cd0475c0823abc289125e4095b0ba5256f71538.tar.gz
stable-diffusion-webui-gfx803-9cd0475c0823abc289125e4095b0ba5256f71538.tar.bz2
stable-diffusion-webui-gfx803-9cd0475c0823abc289125e4095b0ba5256f71538.zip
Merge pull request #12526 from brkirch/mps-adjust-sub-quad
Fixes for `git checkout`, MPS/macOS fixes and optimizations
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r--modules/launch_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py
index 94b2322a..449a8755 100644
--- a/modules/launch_utils.py
+++ b/modules/launch_utils.py
@@ -173,6 +173,9 @@ def git_clone(url, dir, name, commithash=None):
if current_hash == commithash:
return
+ if run_git(dir, name, 'config --get remote.origin.url', None, f"Couldn't determine {name}'s origin URL", live=False).strip() != url:
+ run_git(dir, name, f'remote set-url origin "{url}"', None, f"Failed to set {name}'s origin URL", live=False)
+
run_git(dir, name, 'fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}", autofix=False)
run_git(dir, name, f'checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}", live=True)