CommandHelper
Contains helpers which allow to interact with git via the command line.
Functions and values
Function or value | Description |
directRunGitCommand(...)
Signature: repositoryDir:string -> command:string -> bool
|
Runs the given git command, waits for its completion and returns whether it succeeded. |
directRunGitCommandAndFail(...)
Signature: repositoryDir:string -> command:string -> unit
|
Runs the given git command, waits for its completion and fails when it didn't succeeded. |
findGitDir(repositoryDir)
Signature: repositoryDir:string -> DirectoryInfo
|
Searches the .git directory recursivly up to the root. |
fireAndForgetGitCommand(...)
Signature: repositoryDir:string -> command:string -> unit
|
Fires the given git command ind the given repository directory and returns immediatly. |
gitCommand repositoryDir command
Signature: repositoryDir:string -> command:string -> unit
|
Runs the given git command, waits for its completion. |
gitPath
Signature: string
|
Tries to locate the git.exe via the eviroment variable "GIT". |
gitTimeOut
Signature: TimeSpan
|
Specifies a global timeout for git.exe - default is no timeout |
runGitCommand repositoryDir command
Signature: repositoryDir:string -> command:string -> bool * List<string> * string
|
Runs git.exe with the given command in the given repository directory. |
runSimpleGitCommand(...)
Signature: repositoryDir:string -> command:string -> string
|
Runs the git command and returns the first line of the result. |
showGitCommand repositoryDir command
Signature: repositoryDir:string -> command:string -> unit
|
Runs the given git command, waits for its completion. This version doesn't throw an exception if an error occurs. It just traces the error. |