module documentation
Object format abstraction for Git objects.
This module provides an abstraction layer for different object formats used in Git repositories (SHA-1 and SHA-256).
| Class | |
Object format (hash algorithm) used in Git. |
| Function | get |
Get an object format by name. |
| Function | verify |
Verify that all provided object formats are the same. |
| Constant | OBJECT |
Undocumented |
| Constant | OBJECT |
Undocumented |
| Constant | SHA1 |
Undocumented |
| Constant | SHA256 |
Undocumented |
Get an object format by name.
| Parameters | |
name:str | None | Format name ("sha1" or "sha256"). If None, returns default. |
| Returns | |
ObjectFormat | ObjectFormat instance |
| Raises | |
ValueError | If the format name is not supported |
Verify that all provided object formats are the same.
| Parameters | |
*formats:ObjectFormat | Object format instances to verify |
| Returns | |
ObjectFormat | The common object format |
| Raises | |
ValueError | If formats don't match or no formats provided |
SHA1 =
¶
Undocumented
| Value |
|
SHA256 =
¶
Undocumented
| Value |
|