Class GitCommand
- Namespace
- DotNetDo
- Assembly
- DotNetDo.Core.dll
Runs Git against an explicitly bound repository, or the discovered workspace repository.
public abstract record GitCommand : ExecToolCommand, IEquatable<ExecOptions>, IEquatable<ToolCommand>, IEquatable<ToolCommand<ExecResult>>, IEquatable<ExecToolCommand>, IEquatable<GitCommand>Inheritance
Derived
Implements
Constructors
GitCommand()
Initializes a Git command, optionally bound to a repository working directory.
protected GitCommand()GitCommand(GitCommand)
Initializes a Git command, optionally bound to a repository working directory.
protected GitCommand(GitCommand original)Parameters
originalGitCommand
GitCommand(GitRepository)
Initializes a Git command, optionally bound to a repository working directory.
protected GitCommand(GitRepository repository)Parameters
repositoryGitRepository
Properties
GitPrefix
Targets Git at the repository root without changing the process working directory.
protected string GitPrefix { get; }Property Value
Repository
The bound repository, falling back to the workspace repository when none was supplied.
protected GitRepository Repository { get; }Property Value
Methods
RenderPaths(IReadOnlyList<RelativePath>, bool, string)
Renders either explicit repository-relative paths or the command's all-path form, rejecting ambiguous selection.
protected static string RenderPaths(IReadOnlyList<RelativePath> paths, bool all, string allArguments)Parameters
pathsIReadOnlyList<RelativePath>allboolallArgumentsstring