Ggit.OId¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Ggit.OId¶
Represents a unique ID of any object.
- classmethod new_from_raw(raw)¶
- Parameters:
raw (
bytes
) – the raw input bytes to be copied.- Returns:
- Return type:
Creates a new
Ggit.OId
from a raw oid.
- classmethod new_from_string(str)¶
- Parameters:
str (
str
) – input hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (40 bytes).- Returns:
- Return type:
Parses a hex formatted object id into a
Ggit.OId
.
- compare(b)¶
- Parameters:
- Returns:
<0, 0, >0 if a < b, a == b, a > b.
- Return type:
Compare two
Ggit.OId
structures.
- free()¶
Frees self.
- has_prefix(prefix)¶
- Parameters:
prefix (
str
) – a prefix.- Returns:
- Return type:
Check whether the object id has a given prefix. Note that the prefix is specified in hexadecimal ASCII.
- is_zero()¶
-
Get whether the oid contains only zeros.