aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-19 05:14:38 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-05-19 06:09:17 +0000
commit379fd6204dfc27e16acc03f705ecd9ff23c2d1c0 (patch)
treee5ed3f0628b10e6a21d3cb27661c58c08e3cdeff /modules
parente38e7dbfb9b6ca193e7c62487b56f572bd718d10 (diff)
downloadstable-diffusion-webui-gfx803-379fd6204dfc27e16acc03f705ecd9ff23c2d1c0.tar.gz
stable-diffusion-webui-gfx803-379fd6204dfc27e16acc03f705ecd9ff23c2d1c0.tar.bz2
stable-diffusion-webui-gfx803-379fd6204dfc27e16acc03f705ecd9ff23c2d1c0.zip
make links to http://<...>.git git extensions work in the extension tab
Diffstat (limited to 'modules')
-rw-r--r--modules/ui_extensions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py
index 4ba3bdd7..ef18f438 100644
--- a/modules/ui_extensions.py
+++ b/modules/ui_extensions.py
@@ -125,7 +125,9 @@ def make_commit_link(commit_hash, remote, text=None):
if text is None:
text = commit_hash[:8]
if remote.startswith("https://github.com/"):
- href = os.path.join(remote, "commit", commit_hash)
+ if remote.endswith(".git"):
+ remote = remote[:-4]
+ href = remote + "/commit/" + commit_hash
return f'<a href="{href}" target="_blank">{text}</a>'
else:
return text