Table of Contents

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

original GitCommand

GitCommand(GitRepository)

Initializes a Git command, optionally bound to a repository working directory.

protected GitCommand(GitRepository repository)

Parameters

repository GitRepository

Properties

GitPrefix

Targets Git at the repository root without changing the process working directory.

protected string GitPrefix { get; }

Property Value

string

Repository

The bound repository, falling back to the workspace repository when none was supplied.

protected GitRepository Repository { get; }

Property Value

GitRepository

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

paths IReadOnlyList<RelativePath>
all bool
allArguments string

Returns

string