MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_current_fingerprint

Function get_current_fingerprint

ci/hooks/check-on-stop.py:209–219  ·  view source on GitHub ↗

Get MD5 fingerprint of current git status. Returns None only when the tree is genuinely clean. Git failures propagate as ``GitPorcelainError`` from ``get_porcelain()``.

(porcelain: str | None = None)

Source from the content-addressed store, hash-verified

207
208
209def get_current_fingerprint(porcelain: str | None = None) -> str | None:
210 """Get MD5 fingerprint of current git status.
211
212 Returns None only when the tree is genuinely clean. Git failures
213 propagate as ``GitPorcelainError`` from ``get_porcelain()``.
214 """
215 if porcelain is None:
216 porcelain = get_porcelain()
217 if porcelain is None:
218 return None
219 return hashlib.md5(porcelain.encode()).hexdigest()
220
221
222def get_session_fingerprint() -> str | None:

Callers 1

should_skip_hookFunction · 0.70

Calls 1

get_porcelainFunction · 0.85

Tested by

no test coverage detected