class documentation

class Commit(ShaFile):

View In Hierarchy

A git commit object

Class Method from_path Open a SHA file from disk.
Method __init__ Don't call this directly
Method check Check this object for internal consistency.
Method sign Undocumented
Method verify Verify GPG signature for this commit (if it is signed).
Class Variable __slots__ Undocumented
Class Variable author Undocumented
Class Variable author_time Undocumented
Class Variable author_timezone Undocumented
Class Variable commit_time Undocumented
Class Variable commit_timezone Undocumented
Class Variable committer Undocumented
Class Variable encoding Undocumented
Class Variable extra Undocumented
Class Variable mergetag Undocumented
Class Variable message Undocumented
Class Variable parents Undocumented
Class Variable tree Undocumented
Class Variable type_name Undocumented
Class Variable type_num Undocumented
Instance Variable gpgsig Undocumented
Method _deserialize Undocumented
Method _get_extra Return extra settings of this commit.
Method _get_parents Return a list of parents of this commit.
Method _serialize Undocumented
Method _set_parents Set a list of parents of this commit.
Instance Variable _author Undocumented
Instance Variable _author_time Undocumented
Instance Variable _author_timezone_neg_utc Undocumented
Instance Variable _commit_time Undocumented
Instance Variable _commit_timezone_neg_utc Undocumented
Instance Variable _committer Undocumented
Instance Variable _encoding Undocumented
Instance Variable _extra Undocumented
Instance Variable _gpgsig Undocumented
Instance Variable _mergetag Undocumented
Instance Variable _message Undocumented
Instance Variable _needs_serialization Undocumented
Instance Variable _parents Undocumented
Instance Variable _tree Undocumented

Inherited from ShaFile:

Class Method from_file Get the contents of a SHA file on disk.
Class Method from_string Create a ShaFile from a string.
Static Method from_raw_chunks Creates an object of the indicated type from the raw chunks given.
Static Method from_raw_string Creates an object of the indicated type from the raw string given.
Method __bytes__ Return raw string serialization of this object.
Method __eq__ Return True if the SHAs of the two objects match.
Method __hash__ Return unique hash for this object.
Method __le__ Check whether SHA of this object is less than or equal to the other.
Method __lt__ Return whether SHA of this object is less than the other.
Method __ne__ Check whether this object does not match the other.
Method __repr__ Undocumented
Method as_legacy_object Return string representing the object in the experimental format.
Method as_legacy_object_chunks Return chunks representing the object in the experimental format.
Method as_pretty_string Return a string representing this object, fit for display.
Method as_raw_chunks Return chunks with serialization of the object.
Method as_raw_string Return raw string with serialization of the object.
Method copy Create a new copy of this SHA1 object from its raw string
Method raw_length Returns the length of the raw string of this object.
Method set_raw_chunks Set the contents of this object from a list of chunks.
Method set_raw_string Set the contents of this object from a serialized string.
Method sha The SHA1 object that is the name of this object.
Property id The hex SHA of this object.
Class Method _is_legacy_object Undocumented
Class Method _parse_file Undocumented
Static Method _parse_legacy_object_header Parse a legacy object, creating it but not reading the file.
Static Method _parse_object_header Parse a new style object, creating it but not reading the file.
Method _check_has_member Check that the object has a given member variable.
Method _header Undocumented
Method _parse_legacy_object Parse a legacy object, setting the raw string.
Method _parse_object Parse a new style object, setting self._text.
Instance Variable _chunked_text Undocumented
Instance Variable _sha Undocumented
@classmethod
def from_path(cls, path):

Open a SHA file from disk.

def __init__(self):

Don't call this directly

def check(self):

Check this object for internal consistency.

Raises
ObjectFormatExceptionif the object is malformed in some way
def sign(self, keyid=None):

Undocumented

Parameters
keyid:Optional[str]Undocumented
def verify(self, keyids=None):

Verify GPG signature for this commit (if it is signed).

Parameters
keyids:Optional[Iterable[str]]Optional iterable of trusted keyids for this commit. If this commit is not signed by any key in keyids verification will fail. If not specified, this function only verifies that the commit has a valid signature.
Raises
gpg.errors.BadSignaturesif GPG signature verification fails
gpg.errors.MissingSignaturesif commit was not signed by a key specified in keyids
__slots__: tuple[str, ...] =

Undocumented

author =

Undocumented

author_time =

Undocumented

author_timezone =

Undocumented

commit_time =

Undocumented

commit_timezone =

Undocumented

committer =

Undocumented

encoding =

Undocumented

extra =

Undocumented

mergetag =

Undocumented

message =

Undocumented

parents =

Undocumented

tree =

Undocumented

type_name: bytes =

Undocumented

type_num: int =

Undocumented

gpgsig =

Undocumented

def _deserialize(self, chunks):

Undocumented

def _get_extra(self):

Return extra settings of this commit.

def _get_parents(self):

Return a list of parents of this commit.

def _serialize(self):

Undocumented

def _set_parents(self, value):

Set a list of parents of this commit.

_author =

Undocumented

_author_time =

Undocumented

_author_timezone_neg_utc: bool =

Undocumented

_commit_time =

Undocumented

_commit_timezone_neg_utc: bool =

Undocumented

_committer =

Undocumented

_encoding =

Undocumented

_extra =

Undocumented

_gpgsig =

Undocumented

_mergetag =

Undocumented

_message =

Undocumented

_needs_serialization: bool =
_parents =

Undocumented

_tree =

Undocumented