MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / get_latest_commit_year

Function get_latest_commit_year

tools/git_tools.py:94–100  ·  view source on GitHub ↗

Get year of latest commit given file

(file)

Source from the content-addressed store, hash-verified

92
93
94def get_latest_commit_year(file):
95 """
96 Get year of latest commit given file
97 """
98 date_str = run(f"git log -1 --format=%cd --date=short {file}",
99 cwd=get_top())
100 return datetime.datetime.strptime(date_str, '%Y-%m-%d').year

Callers 1

stamp_fileFunction · 0.90

Calls 2

get_topFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected