MCPcopy
hub / github.com/nosarthur/gita / get_head

Function get_head

gita/info.py:155–164  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

153
154# TODO: do we need to add the flags here too?
155def get_head(path: str) -> str:
156 result = subprocess.run(
157 "git symbolic-ref -q --short HEAD || git describe --tags --exact-match",
158 shell=True,
159 stdout=subprocess.PIPE,
160 stderr=subprocess.DEVNULL,
161 universal_newlines=True,
162 cwd=path,
163 )
164 return result.stdout.strip()
165
166
167def run_quiet_diff(flags: List[str], args: List[str], path) -> int:

Callers 2

get_repo_statusFunction · 0.85
get_repo_branchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected