MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / update_commit_data

Function update_commit_data

src/bonsai/bonsai/__init__.py:259–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

257 return info
258
259 def update_commit_data() -> None:
260 try:
261 import git
262
263 global last_commit_hash
264 global last_commit_date
265 global last_git_branch
266 path = Path(__file__).resolve().parent
267 repo = git.Repo(str(path), search_parent_directories=True)
268 last_commit_hash = repo.head.object.hexsha
269 last_commit_date = repo.head.object.committed_datetime.isoformat()
270 last_git_branch = repo.active_branch.name
271 except:
272 pass
273
274 if IN_PACKAGE:
275 update_commit_data()

Callers 1

__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected