MCPcopy Create free account
hub / github.com/cztomczak/cefpython / get_git_date

Function get_git_date

tools/automate-git.py:277–284  ·  view source on GitHub ↗

Returns the date for the specified branch/tag/hash.

(path, branch)

Source from the content-addressed store, hash-verified

275
276
277def get_git_date(path, branch):
278 """ Returns the date for the specified branch/tag/hash. """
279 cmd = "%s show -s --format=%%ct %s" % (git_exe, branch)
280 result = exec_cmd(cmd, path)
281 if result['out'] != '':
282 return datetime.utcfromtimestamp(
283 int(result['out'].strip())).strftime('%Y-%m-%d %H:%M:%S UTC')
284 return 'Unknown'
285
286
287def get_git_url(path):

Callers 1

Calls 1

exec_cmdFunction · 0.85

Tested by

no test coverage detected