Callbacks¶
| ConfigCallback(entry, *user_data) | |
| ConfigMatchCallback(match_info, value, *user_data) | |
| CredAcquireCallback(url, username_from_url, allowed_types, cred, *user_data) | |
| DiffBinaryCallback(delta, binary, *user_data) | |
| DiffFileCallback(delta, progress, *user_data) | |
| DiffHunkCallback(delta, hunk, *user_data) | |
| DiffLineCallback(delta, hunk, line, *user_data) | |
| DiffSimilarityMetricBufferSignatureCallback(file, buf, buflen, out, *user_data) | |
| DiffSimilarityMetricFileSignatureCallback(file, fullpath, out, *user_data) | |
| DiffSimilarityMetricFreeSignatureCallback(signature, *user_data) | |
| DiffSimilarityMetricSimilarityCallback(score, signature_a, signature_b, *user_data) | |
| NoteCallback(blob_id, annotated_object_id, *user_data) | |
| ReferencesCallback(reference, *user_data) | |
| ReferencesNameCallback(name, *user_data) | |
| RemoteListCallback(name, oid, loid, local, *user_data) | |
| StashCallback(index, message, stash_oid, *user_data) | |
| StatusCallback(path, status_flags, *user_data) | |
| SubmoduleCallback(submodule, name, *user_data) | |
| TagCallback(name, tag_oid, *user_data) | |
| TransferProgressCallback(stats, *user_data) | |
| TreeWalkCallback(root, entry, *user_data) | 
Details¶
- 
Ggit.ConfigCallback(entry, *user_data)¶
- Parameters: - entry (Ggit.ConfigEntry) – aGgit.ConfigEntry.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go for the next config value or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for retrieving values from a - Ggit.Config. See- Ggit.Config.foreach().
- entry (
- 
Ggit.ConfigMatchCallback(match_info, value, *user_data)¶
- Parameters: - match_info (GLib.MatchInfo) – the match
- value (str) – the value
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go for the next config value or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for retrieving values from a - Ggit.Configusing a regular expression. See- Ggit.Config.match_foreach().
- match_info (
- 
Ggit.CredAcquireCallback(url, username_from_url, allowed_types, cred, *user_data)¶
- Parameters: - url (str) – the resource for which we are demanding a credential.
- username_from_url (strorNone) – The username that was embedded in a “user`host`” remote url, orNoneif not included.
- allowed_types (int) – a bitmask stating which cred types are OK to return.
- cred (Ggit.Cred) – newly created credential object.
- user_data (objectorNone) – user-supplied data.
 - Return type: - Signature of a function which acquires a credential object. 
- url (
- 
Ggit.DiffBinaryCallback(delta, binary, *user_data)¶
- Parameters: - delta (Ggit.DiffDelta) – aGgit.DiffDelta.
- binary (Ggit.DiffBinary) – aGgit.DiffBinary.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - Called for each file. 
- delta (
- 
Ggit.DiffFileCallback(delta, progress, *user_data)¶
- Parameters: - delta (Ggit.DiffDelta) – aGgit.DiffDelta.
- progress (float) – the progress.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - Called for each file. 
- delta (
- 
Ggit.DiffHunkCallback(delta, hunk, *user_data)¶
- Parameters: - delta (Ggit.DiffDelta) – aGgit.DiffDelta.
- hunk (Ggit.DiffHunk) – aGgit.DiffHunk.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - Called for each hunk. 
- delta (
- 
Ggit.DiffLineCallback(delta, hunk, line, *user_data)¶
- Parameters: - delta (Ggit.DiffDelta) – aGgit.DiffDelta.
- hunk (Ggit.DiffHunkorNone) – aGgit.DiffHunk.
- line (Ggit.DiffLine) – aGgit.DiffLine.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - Called for each line. 
- delta (
- 
Ggit.DiffSimilarityMetricBufferSignatureCallback(file, buf, buflen, out, *user_data)¶
- Parameters: - Return type: 
- 
Ggit.DiffSimilarityMetricFileSignatureCallback(file, fullpath, out, *user_data)¶
- Parameters: - Return type: 
- 
Ggit.DiffSimilarityMetricFreeSignatureCallback(signature, *user_data)¶
- Parameters: 
- 
Ggit.DiffSimilarityMetricSimilarityCallback(score, signature_a, signature_b, *user_data)¶
- Parameters: - Return type: 
- 
Ggit.NoteCallback(blob_id, annotated_object_id, *user_data)¶
- Parameters: - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - When iterating over all the notes, callback that will be issued per note. See - Ggit.Repository.note_foreach().
- 
Ggit.ReferencesCallback(reference, *user_data)¶
- Parameters: - Returns: - 0 to go for the next references or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for retrieving the references in a - Ggit.Repository. See- Ggit.Repository.references_foreach().
- 
Ggit.ReferencesNameCallback(name, *user_data)¶
- Parameters: - Returns: - 0 to go for the next references or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for retrieving the references in a - Ggit.Repository. See- Ggit.Repository.references_foreach_name().
- 
Ggit.RemoteListCallback(name, oid, loid, local, *user_data)¶
- Parameters: - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for listing the references of a - Ggit.Remote. See- Ggit.Remote.list().
- 
Ggit.StashCallback(index, message, stash_oid, *user_data)¶
- Parameters: - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - When iterating over all the stashed states, callback that will be issued per entry. See - Ggit.Repository.stash_foreach().
- 
Ggit.StatusCallback(path, status_flags, *user_data)¶
- Parameters: - path (str) – the file to retrieve status for, rooted at the repository working dir.
- status_flags (Ggit.StatusFlags) – the status value.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go for the next file or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for retrieving the status of the files in a - Ggit.Repository. See- Ggit.Repository.file_status_foreach().
- path (
- 
Ggit.SubmoduleCallback(submodule, name, *user_data)¶
- Parameters: - submodule (Ggit.Submodule) – aGgit.Submodule.
- name (str) – the name of the submodule.
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go for the next submodule or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for retrieving the submodules in a - Ggit.Repository. See- Ggit.Repository.submodule_foreach().
- submodule (
- 
Ggit.TagCallback(name, tag_oid, *user_data)¶
- Parameters: - Returns: - 0 to go continue or a - Ggit.Errorin case there was an error.- Return type: - When iterating over all the tags, callback that will be issued per entry. See - Ggit.Repository.tag_foreach().
- 
Ggit.TransferProgressCallback(stats, *user_data)¶
- Parameters: - stats (Ggit.TransferProgress) – aGgit.TransferProgress.
- user_data (objectorNone) – user-supplied data.
 - Returns: - a value less than zero to cancel the transfer. - Return type: - Progress callbacks during indexing. 
- stats (
- 
Ggit.TreeWalkCallback(root, entry, *user_data)¶
- Parameters: - root (str) – the current (relative) root of the entry
- entry (Ggit.TreeEntry) – the tree entry
- user_data (objectorNone) – user-supplied data.
 - Returns: - 0 to go for the next entry or a - Ggit.Errorin case there was an error.- Return type: - The type of the callback functions for walking a tree. See - Ggit.Tree.walk().
- root (