MCPcopy Create free account
hub / github.com/QuinnFreedman/modular / get_most_recent_commit

Function get_most_recent_commit

build.py:53–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def get_most_recent_commit():
54 result = subprocess.run(["git", "log", "-n", "1", "--pretty=format:%H"], capture_output=True)
55 if result.returncode != 0:
56 print("\nError getting most recent git commit")
57 sys.exit(1)
58
59 return result.stdout.decode("utf-8").strip()
60
61
62def has_changed_since(dir, last_commit):

Callers 1

buildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected