MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / git_commit

Function git_commit

setup.py:296–311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294
295
296def git_commit() -> str:
297 try:
298 cmd = ['git', 'rev-parse', 'HEAD']
299 git_commit = (
300 subprocess.Popen(
301 cmd,
302 stdout=subprocess.PIPE,
303 cwd=env_dict.get("PADDLE_SOURCE_DIR"),
304 )
305 .communicate()[0]
306 .strip()
307 )
308 except:
309 git_commit = 'Unknown'
310 git_commit = git_commit.decode('utf-8')
311 return str(git_commit)
312
313
314def _get_version_detail(idx):

Callers 1

write_version_pyFunction · 0.85

Calls 4

strFunction · 0.85
decodeMethod · 0.80
communicateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected