Interface IGitClient
Provides methods to interact with git.
public interface IGitClient
Methods
GetConfig()
Gets the effective Git configuration without secrets.
GitConfigResponse GetConfig()
Returns
GetConfigAsync(CancellationToken)
Gets the effective Git configuration without secrets.
Task<GitConfigResponse> GetConfigAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetDiff(string)
Gets file-level changes for a commit.
IReadOnlyList<GitDiffFile> GetDiff(string commitSha)
Parameters
commitShastring
Returns
GetDiffAsync(string, CancellationToken)
Gets file-level changes for a commit.
Task<IReadOnlyList<GitDiffFile>> GetDiffAsync(string commitSha, CancellationToken cancellationToken = default)
Parameters
commitShastringcancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetHistory()
Gets the configuration history.
IReadOnlyList<GitHistoryEntry> GetHistory()
Returns
GetHistoryAsync(CancellationToken)
Gets the configuration history.
Task<IReadOnlyList<GitHistoryEntry>> GetHistoryAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetStatus()
Gets the current Git status.
GitStatusResponse GetStatus()
Returns
GetStatusAsync(CancellationToken)
Gets the current Git status.
Task<GitStatusResponse> GetStatusAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
Restore(GitRestoreRequest)
Restores the configuration from a commit by creating a new commit.
GitRestoreResponse Restore(GitRestoreRequest request)
Parameters
requestGitRestoreRequest
Returns
RestoreAsync(GitRestoreRequest, CancellationToken)
Restores the configuration from a commit by creating a new commit.
Task<GitRestoreResponse> RestoreAsync(GitRestoreRequest request, CancellationToken cancellationToken = default)
Parameters
requestGitRestoreRequestcancellationTokenCancellationTokenThe token to cancel the current operation.