Ggit.Commit¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Ggit.Object (2), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| amend(update_ref, author, committer, message_encoding, message, tree) | |
| get_author() | |
| get_committer() | |
| get_message() | |
| get_message_encoding() | |
| get_nth_ancestor(n) | |
| get_parents() | |
| get_subject() | |
| get_tree() | |
| get_tree_id() | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Inherited: | Ggit.Native (1) | 
|---|
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Ggit.Commit(**kwargs)¶
- Bases: - Ggit.Object- Abstract: - No - Structure: - Ggit.CommitClass- Represents a commit object. - 
amend(update_ref, author, committer, message_encoding, message, tree)¶
- Parameters: - update_ref (strorNone) – name of the reference to update.
- author (Ggit.Signature) – author signature.
- committer (Ggit.Signature) – committer signature (and time of commit).
- message_encoding (strorNone) – message encoding.
- message (str) – commit message.
- tree (Ggit.Tree) – the tree of objects to commit.
 - Raises: - Returns: - the - Ggit.OIdof the created commit object, or- Nonein case of an error.- Return type: - Amend an existing commit. If update_ref is not - None, the given reference will be updated to point to the newly created commit. Use “HEAD” to update the HEAD of the current branch and make it point to this commit.- If message_encoding is set to - None, “UTF-8” encoding is assumed for the provided message. Note that message will not be cleaned up automatically. You can use- Ggit.message_prettifyto do this yourself if needed.
- update_ref (
 - Returns: - the author of the commit. - Return type: - Ggit.Signatureor- None- Gets the author of self. The returned value must be free’d with - GObject.Object.unref().
 - 
get_committer()¶
- Returns: - the committer of the commit. - Return type: - Ggit.Signatureor- None- Gets the committer of self. The returned value must be free’d with - GObject.Object.unref().
 - 
get_message()¶
- Returns: - the message of the commit. - Return type: - stror- None- Gets the full message of self. The resulting message is always encoded in UTF-8. 
 - 
get_message_encoding()¶
- Returns: - the encoding of the commit message or - None.- Return type: - stror- None- Get the encoding for the message of a commit, as a string representing a standard encoding name. - The encoding may be - Noneif the ‘encoding’ header in the commit is missing; in that case UTF-8 is assumed.
 - 
get_nth_ancestor(n)¶
- Parameters: - n ( - int) – the requested ancestor.- Raises: - GLib.Error- Returns: - the n ancestor commit. - Return type: - Ggit.Commitor- None- Gets the commit object that is the n-th generation ancestor of the named commit object, following only the first parents. Passing %0 to the n parameter returns another instance of self. 
 - 
get_parents()¶
- Returns: - the parents collection of the commit. - Return type: - Ggit.CommitParentsor- None- Gets the parents collection for self. 
 
-