MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / get_commit_hash

Function get_commit_hash

src/misc.py:6–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import builtins
5
6def get_commit_hash():
7 try:
8 file_path = pathlib.Path(__file__).parent
9 return subprocess.check_output(
10 [os.environ.get("GIT", "git"), "rev-parse", "HEAD"],
11 cwd=file_path, shell=False, stderr=subprocess.DEVNULL, encoding='utf8').strip()[0:8]
12 except Exception:
13 return "<none>"
14
15
16REPOSITORY_NAME = "stable-diffusion-webui-depthmap-script"

Callers 1

misc.pyFile · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected