mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
move git_status to sysinfo
This commit is contained in:
@@ -106,7 +106,7 @@ def get_dict():
|
||||
"Python": platform.python_version(),
|
||||
"Version": launch_utils.git_tag(),
|
||||
"Commit": launch_utils.commit_hash(),
|
||||
"Git status": launch_utils.git_status(),
|
||||
"Git status": git_status(paths_internal.script_path),
|
||||
"Script path": paths_internal.script_path,
|
||||
"Data path": paths_internal.data_path,
|
||||
"Extensions dir": paths_internal.extensions_dir,
|
||||
@@ -168,6 +168,11 @@ def run_git(path, *args):
|
||||
return str(e)
|
||||
|
||||
|
||||
def git_status(path):
|
||||
if (Path(path) / '.git').is_dir():
|
||||
return run_git(paths_internal.script_path, 'status')
|
||||
|
||||
|
||||
def get_info_from_repo_path(path: Path):
|
||||
is_repo = (path / '.git').is_dir()
|
||||
return {
|
||||
|
Reference in New Issue
Block a user