Foundry.GitVcs¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Vcs (23), Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Foundry.GitVcs(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Git implementation of the version control system interface.
Foundry.GitVcsprovides Git-specific functionality for version control operations including repository management, branch operations, and remote synchronization. It integrates with the Git library to provide a unified interface for Git operations within the Foundry development environment.- commit(message, author_name, author_email)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.GitCommit] or rejects with error.
- Return type:
Simple API to create a new commit from the index.
- list_status()¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.GitStatusEntry].
- Return type:
- query_config(key)¶
- Parameters:
key (
str) – the config key to query- Returns:
a [class`Dex`.Future] that resolves to a string containing the config value, or rejects with an error if the key is not found or an error occurs
- Return type:
Queries a git configuration value by key from the repository.
The method runs asynchronously in a background thread and returns a [class`Dex`.Future] that resolves to the config value as a string.
New in version 1.1.
- sign_bytes(signing_format, signing_key, bytes)¶
- Parameters:
signing_format (
str) – the format such as “gpg” or “ssh” such as from the config value for “gpg.format”.signing_key (
str) – the signing key to use such as from the config value for “user.signingKey”bytes (
GLib.Bytes) – the bytes to sign
- Returns:
a [class`Dex`.Future] that resolves to a armor contained string.
- Return type:
Signs bytes using the format and key specified.
Use [method`Foundry`.GitVcs.query_config] to get the
New in version 1.1.
- stage_entry(entry, contents)¶
- Parameters:
entry (
Foundry.GitStatusEntry) – a [class`Foundry`.GitStatusEntry]contents (
GLib.BytesorNone) – optional contents to use instead of what is in the working tree.
- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
- stash()¶
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.GitCommit] representing the stash commit or rejects with error.
- Return type:
Stashes the current working directory changes.
This method saves the current changes in the working directory to the stash, similar to running “git stash”. The changes are saved with the default stash options.
New in version 1.1.
- unstage_entry(entry)¶
- Parameters:
entry (
Foundry.GitStatusEntry) – a [class`Foundry`.GitStatusEntry]- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type: