module documentation

Object specification.

Exception AmbiguousShortId The short id is ambiguous.
Function parse_commit Parse a string referring to a single commit.
Function parse_commit_range Parse a string referring to a range of commits.
Function parse_object Parse a string referring to an object.
Function parse_ref Parse a string referring to a reference.
Function parse_refs Parse a list of refspecs to a list of refs.
Function parse_reftuple Parse a reftuple spec.
Function parse_reftuples Parse a list of reftuple specs to a list of reftuples.
Function parse_tree Parse a string referring to a tree.
Function scan_for_short_id Scan an object store for a short id.
Function to_bytes Undocumented
def parse_commit(repo, committish):

Parse a string referring to a single commit.

Returns: A Commit object

Parameters
repoA` Repo` object
committishA string referring to a single commit.
Raises
KeyErrorWhen the reference commits can not be found
ValueErrorIf the range can not be parsed
def parse_commit_range(repo, committishs):

Parse a string referring to a range of commits.

Returns: An iterator over Commit objects

Parameters
repoA Repo object
committishsA string referring to a range of commits.
Raises
KeyErrorWhen the reference commits can not be found
ValueErrorIf the range can not be parsed
def parse_object(repo, objectish):

Parse a string referring to an object.

Returns: A git object

Parameters
repoA Repo object
objectishA string referring to an object
Raises
KeyErrorIf the object can not be found
def parse_ref(container, refspec):

Parse a string referring to a reference.

Returns: A ref

Parameters
containerA RefsContainer object
refspecA string referring to a ref
Raises
KeyErrorIf the ref can not be found
def parse_refs(container, refspecs):

Parse a list of refspecs to a list of refs.

Returns: A list of refs

Parameters
containerA RefsContainer object
refspecsA list of refspecs or a string
Raises
KeyErrorIf one of the refs can not be found
def parse_reftuple(lh_container, rh_container, refspec, force=False):

Parse a reftuple spec.

Returns: A tuple with left and right ref

Parameters
lh_containerA RefsContainer object
rh_containerA RefsContainer object
refspecA string
forceUndocumented
Raises
KeyErrorIf one of the refs can not be found
def parse_reftuples(lh_container, rh_container, refspecs, force=False):

Parse a list of reftuple specs to a list of reftuples.

Returns: A list of refs

Parameters
lh_containerA RefsContainer object
rh_containerA RefsContainer object
refspecs:Union[bytes, List[bytes], List[Tuple[bytes, bytes]]]A list of refspecs or a string
force:boolForce overwriting for all reftuples
Raises
KeyErrorIf one of the refs can not be found
def parse_tree(repo, treeish):

Parse a string referring to a tree.

Returns: A git object

Parameters
repoA Repo object
treeishA string referring to a tree
Raises
KeyErrorIf the object can not be found
def scan_for_short_id(object_store, prefix):

Scan an object store for a short id.

def to_bytes(text):

Undocumented