Module OID
Class "OID".
Functions
OID.hex (str) | Create a new OID object. |
OID.raw (raw) | Create a new OID object. |
OID:fmt () | object method. |
OID:pathfmt () | object method. |
OID_mt:__eq (id) | object meta method. |
OID_mt:__tostring () | object meta method. |
Functions
- OID.hex (str)
-
Create a new OID object.
Calls git_oid_fromstrn:
If N is odd, N-1 characters will be parsed instead. The remaining space in the git_oid will be set to zero.
Parameters
-
str: input hex string of at least size `length`. Must be of type
string
.
Return values:
- OID or
nil
on error. - Error string.
-
str: input hex string of at least size `length`. Must be of type
- OID.raw (raw)
-
Create a new OID object.
Calls git_oid_fromraw:
Parameters
-
raw: the raw input bytes to be copied.. Must be of type
string
.
Return value:
OID. -
raw: the raw input bytes to be copied.. Must be of type
- OID:fmt ()
-
object method.
Return value:
string
. - OID:pathfmt ()
-
object method.
Return value:
string
. - OID_mt:__eq (id)
-
object meta method.
Calls git_oid_cmp:
Parameters
- id: Must be of type OID.
Return value:
integer
. - OID_mt:__tostring ()
-
object meta method.
Return value:
string
.