Class GitClient
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public class GitClient : IGitClient
- Inheritance
-
GitClient
- Implements
- Inherited Members
Methods
GetConfig()
Gets the effective Git configuration without secrets.
public GitConfigResponse GetConfig()
Returns
GetConfigAsync(CancellationToken)
Gets the effective Git configuration without secrets.
public Task<GitConfigResponse> GetConfigAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetDiff(string)
Gets file-level changes for a commit.
public IReadOnlyList<GitDiffFile> GetDiff(string commitSha)
Parameters
commitShastring
Returns
GetDiffAsync(string, CancellationToken)
Gets file-level changes for a commit.
public Task<IReadOnlyList<GitDiffFile>> GetDiffAsync(string commitSha, CancellationToken cancellationToken = default)
Parameters
commitShastringcancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetHistory()
Gets the configuration history.
public IReadOnlyList<GitHistoryEntry> GetHistory()
Returns
GetHistoryAsync(CancellationToken)
Gets the configuration history.
public Task<IReadOnlyList<GitHistoryEntry>> GetHistoryAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetStatus()
Gets the current Git status.
public GitStatusResponse GetStatus()
Returns
GetStatusAsync(CancellationToken)
Gets the current Git status.
public 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.
public GitRestoreResponse Restore(GitRestoreRequest request)
Parameters
requestGitRestoreRequest
Returns
RestoreAsync(GitRestoreRequest, CancellationToken)
Restores the configuration from a commit by creating a new commit.
public Task<GitRestoreResponse> RestoreAsync(GitRestoreRequest request, CancellationToken cancellationToken = default)
Parameters
requestGitRestoreRequestcancellationTokenCancellationTokenThe token to cancel the current operation.