C# Класс GitCommands.GitCommandHelpers

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetArgumentsRequiresSsh bool
GetBisectCommand string
GetCurrentSubmoduleChanges GitCommands.GitSubmoduleStatus
GetCurrentSubmoduleChanges GitCommands.GitSubmoduleStatus
GitItemStatusFromCopyRename GitCommands.GitItemStatus
GitItemStatusFromStatusCharacter GitCommands.GitItemStatus
IsCommitHash bool
IsDiffFile bool
StartProcess System.Diagnostics.Process
StartProcessAndReadAllBytes System.Diagnostics.Process
StartProcessAndReadAllText System.Diagnostics.Process
StartProcessAndReadLines IEnumerable

Открытые методы

Метод Описание
AbortCmd ( ) : string
AbortRebaseCmd ( ) : string
AddSubmoduleCmd ( string remotePath, string localPath, string branch, bool force ) : string
BranchCmd ( string branchName, string revision, bool checkout ) : string
CheckoutCmd ( string branchOrRevisionName, LocalChangesAction changesAction ) : string
CherryPickCmd ( string cherry, bool commit, string arguments ) : string
CleanUpCmd ( bool dryrun, bool directories, bool nonignored, bool ignored, string paths = null ) : string
CloneCmd ( string fromPath, string toPath ) : string
CloneCmd ( string fromPath, string toPath, bool central, bool initSubmodules, [ branch, int depth, [ isSingleBranch ) : string

Git Clone.

ContinueBisectCmd ( GitBisectOption bisectOption ) : string
ContinueRebaseCmd ( ) : string
CreateOrphanCmd ( string newBranchName, string startPoint = null ) : string

Create a new orphan branch from startPoint and switch to it.

CreateProcessStartInfo ( string fileName, string arguments, string workingDirectory, Encoding outputEncoding ) : ProcessStartInfo
DeleteBranchCmd ( string branchName, bool force, bool remoteBranch ) : string
DeleteTagCmd ( string tagName ) : string
FindRenamesAndCopiesOpts ( ) : string
FindRenamesOpt ( ) : string
GetAllChangedFilesCmd ( bool excludeIgnoredFiles, UntrackedFilesMode untrackedFiles, IgnoreSubmodulesMode ignoreSubmodules ) : string
GetAllChangedFilesFromString ( GitModule module, string statusString, bool fromDiff = false ) : List
GetAssumeUnchangedFilesFromString ( GitModule module, string lsString ) : List
GetDefaultHomeDir ( ) : string
GetFileExtension ( string fileName ) : string
GetForcePushArgument ( ForcePushOptions force ) : string
GetFullBranchName ( string branch ) : string
GetHomeDir ( ) : string
GetPlinkCompatibleUrl ( string inputUrl ) : string

Transforms the given input Url to make it compatible with Plink, if necessary

GetRemoteName ( string completeName, IEnumerable remotes ) : string
GetSsh ( ) : string

Gets the git SSH command; or "" if the environment variable is NOT set.

GetSubmoduleStatus ( string text, GitModule module, string fileName ) : GitCommands.GitSubmoduleStatus
MergeBranchCmd ( string branch, bool allowFastForward, bool squash, bool noCommit, string strategy ) : string
MergedBranches ( ) : string
PatchCmd ( string patchFile ) : string
PatchCmdIgnoreWhitespace ( string patchFile ) : string
PatchDirCmd ( ) : string
PatchDirCmdIgnoreWhitespace ( ) : string
Plink ( ) : bool
PushMultipleCmd ( string remote, IEnumerable pushActions ) : string

Pushes multiple sets of local branches to remote branches.

PushTagCmd ( string path, string tag, bool all, ForcePushOptions force = ForcePushOptions.DoNotForce ) : string
ReadCmdOutputLines ( string cmd, string arguments, string workDir, string stdInput ) : IEnumerable

Run command, console window is hidden, wait for exit, redirect output

RebaseCmd ( string branch, bool interactive, bool preserveMerges, bool autosquash, bool autostash ) : string
RebaseRangeCmd ( string from, string branch, string onto, bool interactive, bool preserveMerges, bool autosquash, bool autostash ) : string
RemoveCmd ( bool force = true, bool isRecursive = true ) : string

Remove files from the working tree and from the index. git rm

ResetHardCmd ( string commit ) : string
ResetMixedCmd ( string commit ) : string
ResetSoftCmd ( string commit ) : string
ResolvedCmd ( ) : string
RevertCmd ( string commit, bool autoCommit, int parentIndex ) : string
RunCmd ( string cmd, string arguments ) : string

Run command, console window is hidden, wait for exit, redirect output

RunCmdByte ( string cmd, string arguments, string workingdir, byte stdInput, byte &output, byte &error ) : int

Run command, console window is hidden, wait for exit, redirect output

SetEnvironmentVariable ( bool reload = false ) : void
SetSsh ( string path ) : void

Sets the git SSH command path.

SkipCmd ( ) : string
SkipRebaseCmd ( ) : string
StartBisectCmd ( ) : string
StashSaveCmd ( bool untracked, bool keepIndex, string message ) : string
StopBisectCmd ( ) : string
SubmoduleSyncCmd ( string name ) : string
SubmoduleUpdateCmd ( string name ) : string
TerminateTree ( this process ) : void
UnsetSsh ( ) : void

Un-sets the git SSH command path.

UseSsh ( string arguments ) : bool

Приватные методы

Метод Описание
GetArgumentsRequiresSsh ( string arguments ) : bool
GetBisectCommand ( GitBisectOption bisectOption ) : string
GetCurrentSubmoduleChanges ( GitModule module, string submodule ) : GitCommands.GitSubmoduleStatus
GetCurrentSubmoduleChanges ( GitModule module, string fileName, string oldFileName, bool staged ) : GitCommands.GitSubmoduleStatus
GitItemStatusFromCopyRename ( bool fromDiff, string nextfile, string fileName, char x, string status ) : GitCommands.GitItemStatus
GitItemStatusFromStatusCharacter ( string fileName, char x ) : GitCommands.GitItemStatus
IsCommitHash ( string value ) : bool

Check if a string represents a commit hash

IsDiffFile ( string path ) : bool
StartProcess ( string fileName, string arguments, string workingDirectory, Encoding outputEncoding ) : Process
StartProcessAndReadAllBytes ( string arguments, string cmd, string workDir, byte &stdOutput, byte &stdError, byte stdInput ) : Process
StartProcessAndReadAllText ( string arguments, string cmd, string workDir, string &stdOutput, string &stdError, string stdInput ) : Process
StartProcessAndReadLines ( string arguments, string cmd, string workDir, string stdInput ) : IEnumerable

Описание методов

AbortCmd() публичный статический Метод

public static AbortCmd ( ) : string
Результат string

AbortRebaseCmd() публичный статический Метод

public static AbortRebaseCmd ( ) : string
Результат string

AddSubmoduleCmd() публичный статический Метод

public static AddSubmoduleCmd ( string remotePath, string localPath, string branch, bool force ) : string
remotePath string
localPath string
branch string
force bool
Результат string

BranchCmd() публичный статический Метод

public static BranchCmd ( string branchName, string revision, bool checkout ) : string
branchName string
revision string
checkout bool
Результат string

CheckoutCmd() публичный статический Метод

public static CheckoutCmd ( string branchOrRevisionName, LocalChangesAction changesAction ) : string
branchOrRevisionName string
changesAction LocalChangesAction
Результат string

CherryPickCmd() публичный статический Метод

public static CherryPickCmd ( string cherry, bool commit, string arguments ) : string
cherry string
commit bool
arguments string
Результат string

CleanUpCmd() публичный статический Метод

public static CleanUpCmd ( bool dryrun, bool directories, bool nonignored, bool ignored, string paths = null ) : string
dryrun bool
directories bool
nonignored bool
ignored bool
paths string
Результат string

CloneCmd() публичный статический Метод

public static CloneCmd ( string fromPath, string toPath ) : string
fromPath string
toPath string
Результат string

CloneCmd() публичный статический Метод

Git Clone.
public static CloneCmd ( string fromPath, string toPath, bool central, bool initSubmodules, [ branch, int depth, [ isSingleBranch ) : string
fromPath string
toPath string
central bool Makes a bare repo.
initSubmodules bool
branch [ /// NULL: do not checkout working copy (--no-checkout). /// "" (empty string): checkout remote HEAD (branch param omitted, default behavior for clone). /// (a non-empty string): checkout the given branch (--branch smth). ///
depth int An int value for --depth param, or NULL to omit the param.
isSingleBranch [ /// True: --single-branch. /// False: --no-single-branch. /// NULL: don't pass any such param to git. ///
Результат string

ContinueBisectCmd() публичный статический Метод

public static ContinueBisectCmd ( GitBisectOption bisectOption ) : string
bisectOption GitBisectOption
Результат string

ContinueRebaseCmd() публичный статический Метод

public static ContinueRebaseCmd ( ) : string
Результат string

CreateOrphanCmd() публичный статический Метод

Create a new orphan branch from startPoint and switch to it.
public static CreateOrphanCmd ( string newBranchName, string startPoint = null ) : string
newBranchName string
startPoint string
Результат string

CreateProcessStartInfo() публичный статический Метод

public static CreateProcessStartInfo ( string fileName, string arguments, string workingDirectory, Encoding outputEncoding ) : ProcessStartInfo
fileName string
arguments string
workingDirectory string
outputEncoding System.Text.Encoding
Результат System.Diagnostics.ProcessStartInfo

DeleteBranchCmd() публичный статический Метод

public static DeleteBranchCmd ( string branchName, bool force, bool remoteBranch ) : string
branchName string
force bool
remoteBranch bool
Результат string

DeleteTagCmd() публичный статический Метод

public static DeleteTagCmd ( string tagName ) : string
tagName string
Результат string

FindRenamesAndCopiesOpts() публичный статический Метод

public static FindRenamesAndCopiesOpts ( ) : string
Результат string

FindRenamesOpt() публичный статический Метод

public static FindRenamesOpt ( ) : string
Результат string

GetAllChangedFilesCmd() публичный статический Метод

public static GetAllChangedFilesCmd ( bool excludeIgnoredFiles, UntrackedFilesMode untrackedFiles, IgnoreSubmodulesMode ignoreSubmodules ) : string
excludeIgnoredFiles bool
untrackedFiles UntrackedFilesMode
ignoreSubmodules IgnoreSubmodulesMode
Результат string

GetAllChangedFilesFromString() публичный статический Метод

public static GetAllChangedFilesFromString ( GitModule module, string statusString, bool fromDiff = false ) : List
module GitModule
statusString string
fromDiff bool
Результат List

GetAssumeUnchangedFilesFromString() публичный статический Метод

public static GetAssumeUnchangedFilesFromString ( GitModule module, string lsString ) : List
module GitModule
lsString string
Результат List

GetDefaultHomeDir() публичный статический Метод

public static GetDefaultHomeDir ( ) : string
Результат string

GetFileExtension() публичный статический Метод

public static GetFileExtension ( string fileName ) : string
fileName string
Результат string

GetForcePushArgument() публичный статический Метод

public static GetForcePushArgument ( ForcePushOptions force ) : string
force ForcePushOptions
Результат string

GetFullBranchName() публичный статический Метод

public static GetFullBranchName ( string branch ) : string
branch string
Результат string

GetHomeDir() публичный статический Метод

public static GetHomeDir ( ) : string
Результат string

GetPlinkCompatibleUrl() публичный статический Метод

Transforms the given input Url to make it compatible with Plink, if necessary
public static GetPlinkCompatibleUrl ( string inputUrl ) : string
inputUrl string
Результат string

GetRemoteName() публичный статический Метод

public static GetRemoteName ( string completeName, IEnumerable remotes ) : string
completeName string
remotes IEnumerable
Результат string

GetSsh() публичный статический Метод

Gets the git SSH command; or "" if the environment variable is NOT set.
public static GetSsh ( ) : string
Результат string

GetSubmoduleStatus() публичный статический Метод

public static GetSubmoduleStatus ( string text, GitModule module, string fileName ) : GitCommands.GitSubmoduleStatus
text string
module GitModule
fileName string
Результат GitCommands.GitSubmoduleStatus

MergeBranchCmd() публичный статический Метод

public static MergeBranchCmd ( string branch, bool allowFastForward, bool squash, bool noCommit, string strategy ) : string
branch string
allowFastForward bool
squash bool
noCommit bool
strategy string
Результат string

MergedBranches() публичный статический Метод

public static MergedBranches ( ) : string
Результат string

PatchCmd() публичный статический Метод

public static PatchCmd ( string patchFile ) : string
patchFile string
Результат string

PatchCmdIgnoreWhitespace() публичный статический Метод

public static PatchCmdIgnoreWhitespace ( string patchFile ) : string
patchFile string
Результат string

PatchDirCmd() публичный статический Метод

public static PatchDirCmd ( ) : string
Результат string

PatchDirCmdIgnoreWhitespace() публичный статический Метод

public static PatchDirCmdIgnoreWhitespace ( ) : string
Результат string

Plink() публичный статический Метод

public static Plink ( ) : bool
Результат bool

PushMultipleCmd() публичный статический Метод

Pushes multiple sets of local branches to remote branches.
public static PushMultipleCmd ( string remote, IEnumerable pushActions ) : string
remote string
pushActions IEnumerable
Результат string

PushTagCmd() публичный статический Метод

public static PushTagCmd ( string path, string tag, bool all, ForcePushOptions force = ForcePushOptions.DoNotForce ) : string
path string
tag string
all bool
force ForcePushOptions
Результат string

ReadCmdOutputLines() публичный статический Метод

Run command, console window is hidden, wait for exit, redirect output
public static ReadCmdOutputLines ( string cmd, string arguments, string workDir, string stdInput ) : IEnumerable
cmd string
arguments string
workDir string
stdInput string
Результат IEnumerable

RebaseCmd() публичный статический Метод

public static RebaseCmd ( string branch, bool interactive, bool preserveMerges, bool autosquash, bool autostash ) : string
branch string
interactive bool
preserveMerges bool
autosquash bool
autostash bool
Результат string

RebaseRangeCmd() публичный статический Метод

public static RebaseRangeCmd ( string from, string branch, string onto, bool interactive, bool preserveMerges, bool autosquash, bool autostash ) : string
from string
branch string
onto string
interactive bool
preserveMerges bool
autosquash bool
autostash bool
Результат string

RemoveCmd() публичный статический Метод

Remove files from the working tree and from the index. git rm
public static RemoveCmd ( bool force = true, bool isRecursive = true ) : string
force bool Override the up-to-date check.
isRecursive bool Allow recursive removal when a leading directory name is given.
Результат string

ResetHardCmd() публичный статический Метод

public static ResetHardCmd ( string commit ) : string
commit string
Результат string

ResetMixedCmd() публичный статический Метод

public static ResetMixedCmd ( string commit ) : string
commit string
Результат string

ResetSoftCmd() публичный статический Метод

public static ResetSoftCmd ( string commit ) : string
commit string
Результат string

ResolvedCmd() публичный статический Метод

public static ResolvedCmd ( ) : string
Результат string

RevertCmd() публичный статический Метод

public static RevertCmd ( string commit, bool autoCommit, int parentIndex ) : string
commit string
autoCommit bool
parentIndex int
Результат string

RunCmd() публичный статический Метод

Run command, console window is hidden, wait for exit, redirect output
public static RunCmd ( string cmd, string arguments ) : string
cmd string
arguments string
Результат string

RunCmdByte() публичный статический Метод

Run command, console window is hidden, wait for exit, redirect output
public static RunCmdByte ( string cmd, string arguments, string workingdir, byte stdInput, byte &output, byte &error ) : int
cmd string
arguments string
workingdir string
stdInput byte
output byte
error byte
Результат int

SetEnvironmentVariable() публичный статический Метод

public static SetEnvironmentVariable ( bool reload = false ) : void
reload bool
Результат void

SetSsh() публичный статический Метод

Sets the git SSH command path.
public static SetSsh ( string path ) : void
path string
Результат void

SkipCmd() публичный статический Метод

public static SkipCmd ( ) : string
Результат string

SkipRebaseCmd() публичный статический Метод

public static SkipRebaseCmd ( ) : string
Результат string

StartBisectCmd() публичный статический Метод

public static StartBisectCmd ( ) : string
Результат string

StashSaveCmd() публичный статический Метод

public static StashSaveCmd ( bool untracked, bool keepIndex, string message ) : string
untracked bool
keepIndex bool
message string
Результат string

StopBisectCmd() публичный статический Метод

public static StopBisectCmd ( ) : string
Результат string

SubmoduleSyncCmd() публичный статический Метод

public static SubmoduleSyncCmd ( string name ) : string
name string
Результат string

SubmoduleUpdateCmd() публичный статический Метод

public static SubmoduleUpdateCmd ( string name ) : string
name string
Результат string

TerminateTree() публичный статический Метод

public static TerminateTree ( this process ) : void
process this
Результат void

UnsetSsh() публичный статический Метод

Un-sets the git SSH command path.
public static UnsetSsh ( ) : void
Результат void

UseSsh() публичный статический Метод

public static UseSsh ( string arguments ) : bool
arguments string
Результат bool