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)
| 207 | |
| 208 | |
| 209 | def 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 | |
| 222 | def get_session_fingerprint() -> str | None: |
no test coverage detected