MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / get_git_short_hash

Function get_git_short_hash

build_scripts/make_version_header.py:7–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def get_git_short_hash() -> str:
8 try:
9 result = subprocess.run(
10 ["git", "rev-parse", "--short=8", "HEAD"],
11 check=True,
12 capture_output=True,
13 text=True,
14 )
15 return result.stdout.strip()
16 except Exception:
17 return "nogit"
18
19
20def main() -> int:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected