C# Class GitCommands.GitModule

Inheritance: IGitModule
Exibir arquivo Open project: pmiossec/gitextensions Class Usage Examples

Public Properties

Property Type Description
DetachedBranch string
LosslessEncoding Encoding

Private Properties

Property Type Description
AppendQuotedString string
CreateGitStartInfo System.Diagnostics.ProcessStartInfo
DecodeString string
Equals bool
GetCurrentSubmoduleStatus void
GetFetchArgs string
GetFileContents string
GetPatch PatchApply.Patch
GetSide string
GetSortedRefsCommand string
GetSubmoduleCommitHash IGitItem
GetSubmoduleInfo GitSubmoduleInfo
GetSubmoduleStatus void
GetTree string
GetTreeFromRemoteRefs CmdResult
GetTreeFromRemoteRefsEx CmdResult
IGitModule IGitModule
InitSuperproject void
ProccessDiffNotes string
ReadCmdOutputLines IEnumerable
RunCacheableCmd string
RunCmd string
RunCmdResult CmdResult
StartProccess Process
UpdateIndex void

Public Methods

Method Description
AddRemote ( string name, string path ) : string
ApplyPatch ( string dir, string amCommand ) : string
AssumeUnchangedFiles ( IList files, bool assumeUnchanged, bool &wereErrors ) : string
Blame ( string filename, string from, Encoding encoding ) : GitCommands.GitBlame
Blame ( string filename, string from, string lines, Encoding encoding ) : GitCommands.GitBlame
CheckBranchFormat ( [ branchName ) : bool

Uses check-ref-format to ensure that a branch name is well formed.

CheckSubmoduleStatus ( string commit, string oldCommit ) : SubmoduleStatus
CheckSubmoduleStatus ( string commit, string oldCommit, GitCommands.CommitData data, GitCommands.CommitData olddata, bool loaddata = false ) : SubmoduleStatus
CheckoutConflictedFiles ( ConflictData unmergedData ) : string[]
CheckoutFiles ( IEnumerable fileList, string revision, bool force ) : string
CommitCmd ( bool amend, bool signOff = false, string author = "", bool useExplicitCommitMessage = true, bool noVerify = false ) : string
DeleteTag ( string tagName ) : string
EditNotes ( string revision ) : void
Equals ( object obj ) : bool
ExistsMergeCommit ( string startRev, string endRev ) : bool
FetchCmd ( string remote, string remoteBranch, string localBranch, bool fetchTags = false, bool isUnshallow = false ) : string
FindGitSuperprojectPath ( string &submoduleName, string &submodulePath ) : string
FindGitWorkingDir ( string startDir ) : string
FindTopProjectModule ( ) : GitModule
FormatBranchName ( [ branchName ) : string

Format branch name, check if name is valid for repository.

FormatPatch ( string from, string to, string output ) : string
FormatPatch ( string from, string to, string output, int start ) : string
GetAllBranchesWhichContainGivenCommit ( string sha1, bool getLocal, bool getRemote ) : IEnumerable

Gets branches which contain the given commit. If both local and remote branches are requested, remote branches are prefixed with "remotes/" (as returned by git branch -a)

GetAllChangedFiles ( bool excludeIgnoredFiles = true, bool excludeAssumeUnchangedFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default ) : IList
GetAllChangedFilesWithSubmodulesStatus ( bool excludeIgnoredFiles = true, bool excludeAssumeUnchangedFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default ) : IList
GetAllTagsWhichContainGivenCommit ( string sha1 ) : IEnumerable

Gets all tags which contain the given commit.

GetCombinedDiffContent ( GitRevision revisionOfMergeCommit, string filePath, string extraArgs, Encoding encoding ) : string
GetCombinedDiffFileList ( string shaOfMergeCommit ) : IList
GetCommitCount ( string parentHash, string childHash ) : int?
GetCommitCountString ( string from, string to ) : string
GetConflict ( string filename ) : ConflictData
GetConflicts ( string filename = "" ) : List
GetCurrentChanges ( string fileName, string oldFileName, bool staged, string extraDiffArguments, Encoding encoding ) : PatchApply.Patch
GetCurrentCheckout ( ) : string
GetCurrentRemote ( ) : string

Gets the remote of the current branch; or "origin" if no remote is configured.

GetCurrentSubmoduleLocalPath ( ) : string
GetDiffFiles ( string from, string to, bool noCache = false ) : List
GetDiffFilesText ( string from, string to ) : string
GetDiffFilesText ( string from, string to, bool noCache ) : string
GetDiffFilesWithSubmodulesStatus ( string from, string to ) : List
GetEffectivePathSetting ( string setting ) : string
GetEffectiveSetting ( string setting ) : string
GetEffectiveSettings ( ) : ISettingsSource
GetFileBlobHash ( string fileName, string revision ) : string
GetFileContents ( GitCommands.GitItemStatus file ) : string
GetFileStream ( string blob ) : Stream
GetFileText ( string id, Encoding encoding ) : string
GetFullTree ( string id ) : string[]
GetGitDirectory ( ) : string

Gets the ".git" directory path.

GetGitDirectory ( string repositoryPath ) : string
GetHashCode ( ) : int
GetIgnoredFiles ( IEnumerable ignorePatterns ) : IList

Returns list of filenames which would be ignored

GetInteractiveRebasePatchFiles ( ) : IList
GetLocalTrackingBranchName ( string remoteName, string branch ) : string
GetMergeBase ( string a, string b ) : string
GetMergeMessage ( ) : string
GetMergedBranches ( ) : ICollection
GetNextRebasePatch ( ) : string
GetParents ( string commit ) : string[]
GetParentsRevisions ( string commit ) : GitCommands.GitRevision[]
GetPathSetting ( string setting ) : string
GetPreviousCommitMessages ( int count ) : IEnumerable
GetPreviousCommitMessages ( string revision, int count ) : IEnumerable
GetPuttyKeyFileForRemote ( string remote ) : string
GetRebaseDir ( ) : string
GetRebasePatchFiles ( ) : IList
GetRefs ( bool tags = true, bool branches = true ) : IList
GetRemoteBranch ( string branch ) : string

Gets the remote branch of the specified local branch; or "" if none is configured.

GetRemoteBranches ( ) : IEnumerable
GetRemoteServerRefs ( string remote, bool tags, bool branches ) : RemoteActionResult>
GetRemotes ( bool allowEmpty = true ) : string[]
GetRevision ( string commit, bool shortFormat = false ) : GitRevision
GetSelectedBranch ( ) : string

Gets the current branch; or "(no branch)" if HEAD is detached.

GetSelectedBranch ( string repositoryPath ) : string

Gets the current branch; or "(no branch)" if HEAD is detached.

GetSelectedBranchFast ( string repositoryPath ) : string

Dirty but fast. This sometimes fails.

GetSetting ( string setting ) : string
GetSettings ( string setting ) : IEnumerable
GetSingleDiff ( string @from, string to, string fileName, string oldFileName, string extraDiffArguments, Encoding encoding, bool cacheResult ) : PatchApply.Patch
GetSortedRefs ( ) : IList
GetStagedFiles ( ) : IList
GetStagedFilesWithSubmodulesStatus ( ) : IList
GetStashDiffFiles ( string stashName ) : IList
GetStashes ( ) : IList
GetStatusText ( bool untracked ) : string
GetSubmodule ( string localPath ) : GitModule
GetSubmoduleConfigFile ( ) : ConfigFile
GetSubmoduleFullPath ( string localPath ) : string
GetSubmoduleItemsForEachRef ( string filename, bool>.Func showRemoteRef ) : IGitItem>.Dictionary
GetSubmoduleNameByPath ( string localPath ) : string
GetSubmoduleRemotePath ( string name ) : string
GetSubmoduleSummary ( string submodule ) : string
GetSubmodulesInfo ( ) : IEnumerable
GetSubmodulesLocalPaths ( bool recursive = true ) : IList

This is a faster function to get the names of all submodules then the GetSubmodules() function. The command @git submodule is very slow.

GetSuperprojectCurrentCheckout ( ) : string>.KeyValuePair
GetTagMessage ( string tag ) : string

Returns tag's message. If the lightweight tag is passed, corresponding commit message is returned.

GetTagRefs ( GetTagRefsSortOrder option ) : IList

GetTree ( string id, bool full ) : IList
GetTreeFiles ( string treeGuid, bool full ) : IList
GetTreeRefs ( string tree ) : IList
GetUnstagedFiles ( ) : IList
GetUnstagedFilesWithSubmodulesStatus ( ) : IList
GitModule ( string workingdir ) : System
GitStatus ( UntrackedFilesMode untrackedFilesMode, IgnoreSubmodulesMode ignoreSubmodulesMode ) : IList
HandleConflictSelectSide ( string fileName, string side ) : bool
HandleConflictsSaveSide ( string fileName, string saveAsFileName, string side ) : bool
HasSubmodules ( ) : bool
InTheMiddleOfAction ( ) : bool
InTheMiddleOfBisect ( ) : bool
InTheMiddleOfConflictedMerge ( ) : bool
InTheMiddleOfInteractiveRebase ( ) : bool
InTheMiddleOfPatch ( ) : bool
InTheMiddleOfRebase ( ) : bool
Init ( bool bare, bool shared ) : string
IsBareRepository ( ) : bool
IsBareRepository ( string repositoryPath ) : bool
IsDetachedHead ( ) : bool

Indicates whether HEAD is not pointing to a branch.

IsDetachedHead ( string branch ) : bool
IsDirtyDir ( ) : bool

Indicates whether there are any changes to the repository, including any untracked files or directories; excluding submodules.

IsLockedIndex ( ) : bool
IsLockedIndex ( string repositoryPath ) : bool
IsMerge ( string commit ) : bool
IsRunningGitProcess ( ) : bool
IsSubmodule ( string submodulePath ) : bool
IsValidGitWorkingDir ( ) : bool

Indicates whether the WorkingDir contains a git repository.

IsValidGitWorkingDir ( string dir ) : bool

Indicates whether the specified directory contains a git repository.

LastPullActionToFormPullAction ( ) : void
OpenWithDifftool ( string filename, string oldFileName = "", string revision1 = null, string revision2 = null, string extraDiffArguments = "" ) : string
PathIsUrl ( string path ) : bool
PullCmd ( string remote, string remoteBranch, string localBranch, bool rebase, bool fetchTags = false, bool isUnshallow = false ) : string
PushAllCmd ( string remote, ForcePushOptions force, bool track, int recursiveSubmodules ) : string

Creates a 'git push' command using the specified parameters.

PushCmd ( string remote, string fromBranch, string toBranch, ForcePushOptions force, bool track, int recursiveSubmodules ) : string

Creates a 'git push' command using the specified parameters.

ReEncodeCommitMessage ( string s, string toEncodingName ) : string
ReEncodeFileNameFromLossless ( string fileName ) : string
ReEncodeShowString ( string s ) : string

header part of show result is encoded in logoutputencoding (including reencoded commit message) diff part is raw data in file's original encoding s should be encoded in LosslessEncoding

ReEncodeString ( string s, Encoding fromEncoding, Encoding toEncoding ) : string
ReEncodeStringFromLossless ( string s ) : string
ReEncodeStringFromLossless ( string s, Encoding toEncoding ) : string

reencodes string from GitCommandHelpers.LosslessEncoding to toEncoding

ReadGitOutputLines ( string arguments ) : IEnumerable

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

RemoveFiles ( IEnumerable fileList, bool force ) : string
RemoveRemote ( string name ) : string
RenameBranch ( string name, string newName ) : string
RenameRemote ( string name, string newName ) : string
ResetFile ( string file ) : string
ResetHard ( string commit ) : string
ResetHard ( string commit, string file ) : string
ResetMixed ( string commit ) : string
ResetMixed ( string commit, string file ) : string
ResetSoft ( string commit ) : string
ResetSoft ( string commit, string file ) : string
RevParse ( string revisionExpression ) : string
RunBash ( string bashCommand = null ) : Process

Runs a bash or shell command.

RunBatchFile ( string batchFile ) : string

Run batch file, console window is hidden, wait for exit, redirect output

RunExternalCmdDetached ( string cmd, string arguments ) : Process

Run command, console window is hidden

RunExternalCmdDetached ( string fileName, string arguments, string workingDir ) : Process

Run command, console window is hidden

RunExternalCmdDetachedShowConsole ( string cmd, string arguments ) : Process

Run command, console window is visible

RunExternalCmdShowConsole ( string cmd, string arguments ) : void

Run command, console window is visible, wait for exit

RunGitCmd ( string arguments, Encoding encoding = null, byte stdInput = null ) : string

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

RunGitCmdDetached ( string arguments, Encoding encoding = null ) : Process

Run git command, console window is hidden, redirect output

RunGitCmdResult ( string arguments, Encoding encoding = null, byte stdInput = null ) : CmdResult

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

RunGitK ( ) : void
RunGui ( ) : void
SaveBlobAs ( string saveAs, string blob ) : void
SetPathSetting ( string setting, string value ) : void
SetSetting ( string setting, string value ) : void
ShowSha1 ( string sha1 ) : string
StageFile ( string file ) : string
StageFileToRemove ( string file ) : string
StageFiles ( IList files, bool &wereErrors ) : string
StartPageantForRemote ( string remote ) : bool

Tries to start Pageant for the specified remote repo (using the remote's PuTTY key file).

StartPageantWithKey ( string sshKeyFile ) : void
StreamCopy ( Stream input, Stream output ) : void
Tag ( string tagName, string revision, bool annotation, bool force ) : string
ToString ( ) : string
UnquoteFileName ( string fileName ) : string
UnsetSetting ( string setting ) : void
UnstageFile ( string file ) : string
UnstageFileToRemove ( string file ) : string
UnstageFiles ( IList files ) : string

Private Methods

Method Description
AppendQuotedString ( string str1, string str2 ) : string
CreateGitStartInfo ( string arguments ) : ProcessStartInfo
DecodeString ( string str ) : string
Equals ( GitModule other ) : bool
GetCurrentSubmoduleStatus ( IList status ) : void
GetFetchArgs ( string remote, string remoteBranch, string localBranch, bool fetchTags, bool isUnshallow ) : string
GetFileContents ( string path ) : string
GetPatch ( PatchApply patchManager, string fileName, string oldFileName ) : PatchApply.Patch
GetSide ( string side ) : string
GetSortedRefsCommand ( ) : string
GetSubmoduleCommitHash ( string filename, string refName ) : IGitItem
GetSubmoduleInfo ( string submodule ) : GitSubmoduleInfo
GetSubmoduleStatus ( IList status, string from, string to ) : void
GetTree ( bool tags, bool branches ) : string
GetTreeFromRemoteRefs ( string remote, bool tags, bool branches ) : CmdResult
GetTreeFromRemoteRefsEx ( string remote, bool tags, bool branches ) : CmdResult
IGitModule ( string submoduleName ) : IGitModule
InitSuperproject ( ) : void
ProccessDiffNotes ( int startIndex, string lines ) : string
ReadCmdOutputLines ( string cmd, string arguments, string stdInput ) : IEnumerable
RunCacheableCmd ( string cmd, string arguments = "", Encoding encoding = null ) : string
RunCmd ( string cmd, string arguments, Encoding encoding = null, byte stdInput = null ) : string
RunCmdResult ( string cmd, string arguments, Encoding encoding = null, byte stdInput = null ) : CmdResult
StartProccess ( string fileName, string arguments, string workingDir, bool showConsole ) : Process
UpdateIndex ( Lazy processReader, string filename ) : void

Method Details

AddRemote() public method

public AddRemote ( string name, string path ) : string
name string
path string
return string

ApplyPatch() public method

public ApplyPatch ( string dir, string amCommand ) : string
dir string
amCommand string
return string

AssumeUnchangedFiles() public method

public AssumeUnchangedFiles ( IList files, bool assumeUnchanged, bool &wereErrors ) : string
files IList
assumeUnchanged bool
wereErrors bool
return string

Blame() public method

public Blame ( string filename, string from, Encoding encoding ) : GitCommands.GitBlame
filename string
from string
encoding System.Text.Encoding
return GitCommands.GitBlame

Blame() public method

public Blame ( string filename, string from, string lines, Encoding encoding ) : GitCommands.GitBlame
filename string
from string
lines string
encoding System.Text.Encoding
return GitCommands.GitBlame

CheckBranchFormat() public method

Uses check-ref-format to ensure that a branch name is well formed.
public CheckBranchFormat ( [ branchName ) : bool
branchName [ Branch name to test.
return bool

CheckSubmoduleStatus() public method

public CheckSubmoduleStatus ( string commit, string oldCommit ) : SubmoduleStatus
commit string
oldCommit string
return SubmoduleStatus

CheckSubmoduleStatus() public method

public CheckSubmoduleStatus ( string commit, string oldCommit, GitCommands.CommitData data, GitCommands.CommitData olddata, bool loaddata = false ) : SubmoduleStatus
commit string
oldCommit string
data GitCommands.CommitData
olddata GitCommands.CommitData
loaddata bool
return SubmoduleStatus

CheckoutConflictedFiles() public method

public CheckoutConflictedFiles ( ConflictData unmergedData ) : string[]
unmergedData ConflictData
return string[]

CheckoutFiles() public method

public CheckoutFiles ( IEnumerable fileList, string revision, bool force ) : string
fileList IEnumerable
revision string
force bool
return string

CommitCmd() public method

public CommitCmd ( bool amend, bool signOff = false, string author = "", bool useExplicitCommitMessage = true, bool noVerify = false ) : string
amend bool
signOff bool
author string
useExplicitCommitMessage bool
noVerify bool
return string

DeleteTag() public method

public DeleteTag ( string tagName ) : string
tagName string
return string

EditNotes() public method

public EditNotes ( string revision ) : void
revision string
return void

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

ExistsMergeCommit() public method

public ExistsMergeCommit ( string startRev, string endRev ) : bool
startRev string
endRev string
return bool

FetchCmd() public method

public FetchCmd ( string remote, string remoteBranch, string localBranch, bool fetchTags = false, bool isUnshallow = false ) : string
remote string
remoteBranch string
localBranch string
fetchTags bool
isUnshallow bool
return string

FindGitSuperprojectPath() public method

public FindGitSuperprojectPath ( string &submoduleName, string &submodulePath ) : string
submoduleName string
submodulePath string
return string

FindGitWorkingDir() public static method

public static FindGitWorkingDir ( string startDir ) : string
startDir string
return string

FindTopProjectModule() public method

public FindTopProjectModule ( ) : GitModule
return GitModule

FormatBranchName() public method

Format branch name, check if name is valid for repository.
public FormatBranchName ( [ branchName ) : string
branchName [ Branch name to test.
return string

FormatPatch() public method

public FormatPatch ( string from, string to, string output ) : string
from string
to string
output string
return string

FormatPatch() public method

public FormatPatch ( string from, string to, string output, int start ) : string
from string
to string
output string
start int
return string

GetAllBranchesWhichContainGivenCommit() public method

Gets branches which contain the given commit. If both local and remote branches are requested, remote branches are prefixed with "remotes/" (as returned by git branch -a)
public GetAllBranchesWhichContainGivenCommit ( string sha1, bool getLocal, bool getRemote ) : IEnumerable
sha1 string The sha1.
getLocal bool Pass true to include local branches
getRemote bool Pass true to include remote branches
return IEnumerable

GetAllChangedFiles() public method

public GetAllChangedFiles ( bool excludeIgnoredFiles = true, bool excludeAssumeUnchangedFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default ) : IList
excludeIgnoredFiles bool
excludeAssumeUnchangedFiles bool
untrackedFiles UntrackedFilesMode
return IList

GetAllChangedFilesWithSubmodulesStatus() public method

public GetAllChangedFilesWithSubmodulesStatus ( bool excludeIgnoredFiles = true, bool excludeAssumeUnchangedFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default ) : IList
excludeIgnoredFiles bool
excludeAssumeUnchangedFiles bool
untrackedFiles UntrackedFilesMode
return IList

GetAllTagsWhichContainGivenCommit() public method

Gets all tags which contain the given commit.
public GetAllTagsWhichContainGivenCommit ( string sha1 ) : IEnumerable
sha1 string The sha1.
return IEnumerable

GetCombinedDiffContent() public method

public GetCombinedDiffContent ( GitRevision revisionOfMergeCommit, string filePath, string extraArgs, Encoding encoding ) : string
revisionOfMergeCommit GitRevision
filePath string
extraArgs string
encoding System.Text.Encoding
return string

GetCombinedDiffFileList() public method

public GetCombinedDiffFileList ( string shaOfMergeCommit ) : IList
shaOfMergeCommit string
return IList

GetCommitCount() public method

public GetCommitCount ( string parentHash, string childHash ) : int?
parentHash string
childHash string
return int?

GetCommitCountString() public method

public GetCommitCountString ( string from, string to ) : string
from string
to string
return string

GetConflict() public method

public GetConflict ( string filename ) : ConflictData
filename string
return ConflictData

GetConflicts() public method

public GetConflicts ( string filename = "" ) : List
filename string
return List

GetCurrentChanges() public method

public GetCurrentChanges ( string fileName, string oldFileName, bool staged, string extraDiffArguments, Encoding encoding ) : PatchApply.Patch
fileName string
oldFileName string
staged bool
extraDiffArguments string
encoding System.Text.Encoding
return PatchApply.Patch

GetCurrentCheckout() public method

public GetCurrentCheckout ( ) : string
return string

GetCurrentRemote() public method

Gets the remote of the current branch; or "origin" if no remote is configured.
public GetCurrentRemote ( ) : string
return string

GetCurrentSubmoduleLocalPath() public method

public GetCurrentSubmoduleLocalPath ( ) : string
return string

GetDiffFiles() public method

public GetDiffFiles ( string from, string to, bool noCache = false ) : List
from string
to string
noCache bool
return List

GetDiffFilesText() public method

public GetDiffFilesText ( string from, string to ) : string
from string
to string
return string

GetDiffFilesText() public method

public GetDiffFilesText ( string from, string to, bool noCache ) : string
from string
to string
noCache bool
return string

GetDiffFilesWithSubmodulesStatus() public method

public GetDiffFilesWithSubmodulesStatus ( string from, string to ) : List
from string
to string
return List

GetEffectivePathSetting() public method

public GetEffectivePathSetting ( string setting ) : string
setting string
return string

GetEffectiveSetting() public method

public GetEffectiveSetting ( string setting ) : string
setting string
return string

GetEffectiveSettings() public method

public GetEffectiveSettings ( ) : ISettingsSource
return ISettingsSource

GetFileBlobHash() public method

public GetFileBlobHash ( string fileName, string revision ) : string
fileName string
revision string
return string

GetFileContents() public method

public GetFileContents ( GitCommands.GitItemStatus file ) : string
file GitCommands.GitItemStatus
return string

GetFileStream() public method

public GetFileStream ( string blob ) : Stream
blob string
return Stream

GetFileText() public method

public GetFileText ( string id, Encoding encoding ) : string
id string
encoding System.Text.Encoding
return string

GetFullTree() public method

public GetFullTree ( string id ) : string[]
id string
return string[]

GetGitDirectory() public method

Gets the ".git" directory path.
public GetGitDirectory ( ) : string
return string

GetGitDirectory() public static method

public static GetGitDirectory ( string repositoryPath ) : string
repositoryPath string
return string

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetIgnoredFiles() public method

Returns list of filenames which would be ignored
public GetIgnoredFiles ( IEnumerable ignorePatterns ) : IList
ignorePatterns IEnumerable Patterns to ignore (.gitignore syntax)
return IList

GetInteractiveRebasePatchFiles() public method

public GetInteractiveRebasePatchFiles ( ) : IList
return IList

GetLocalTrackingBranchName() public method

public GetLocalTrackingBranchName ( string remoteName, string branch ) : string
remoteName string
branch string
return string

GetMergeBase() public method

public GetMergeBase ( string a, string b ) : string
a string
b string
return string

GetMergeMessage() public method

public GetMergeMessage ( ) : string
return string

GetMergedBranches() public method

public GetMergedBranches ( ) : ICollection
return ICollection

GetNextRebasePatch() public method

public GetNextRebasePatch ( ) : string
return string

GetParents() public method

public GetParents ( string commit ) : string[]
commit string
return string[]

GetParentsRevisions() public method

public GetParentsRevisions ( string commit ) : GitCommands.GitRevision[]
commit string
return GitCommands.GitRevision[]

GetPathSetting() public method

public GetPathSetting ( string setting ) : string
setting string
return string

GetPreviousCommitMessages() public method

public GetPreviousCommitMessages ( int count ) : IEnumerable
count int
return IEnumerable

GetPreviousCommitMessages() public method

public GetPreviousCommitMessages ( string revision, int count ) : IEnumerable
revision string
count int
return IEnumerable

GetPuttyKeyFileForRemote() public method

public GetPuttyKeyFileForRemote ( string remote ) : string
remote string
return string

GetRebaseDir() public method

public GetRebaseDir ( ) : string
return string

GetRebasePatchFiles() public method

public GetRebasePatchFiles ( ) : IList
return IList

GetRefs() public method

public GetRefs ( bool tags = true, bool branches = true ) : IList
tags bool
branches bool
return IList

GetRemoteBranch() public method

Gets the remote branch of the specified local branch; or "" if none is configured.
public GetRemoteBranch ( string branch ) : string
branch string
return string

GetRemoteBranches() public method

public GetRemoteBranches ( ) : IEnumerable
return IEnumerable

GetRemoteServerRefs() public method

public GetRemoteServerRefs ( string remote, bool tags, bool branches ) : RemoteActionResult>
remote string
tags bool
branches bool
return RemoteActionResult>

GetRemotes() public method

public GetRemotes ( bool allowEmpty = true ) : string[]
allowEmpty bool
return string[]

GetRevision() public method

public GetRevision ( string commit, bool shortFormat = false ) : GitRevision
commit string
shortFormat bool
return GitRevision

GetSelectedBranch() public method

Gets the current branch; or "(no branch)" if HEAD is detached.
public GetSelectedBranch ( ) : string
return string

GetSelectedBranch() public method

Gets the current branch; or "(no branch)" if HEAD is detached.
public GetSelectedBranch ( string repositoryPath ) : string
repositoryPath string
return string

GetSelectedBranchFast() public static method

Dirty but fast. This sometimes fails.
public static GetSelectedBranchFast ( string repositoryPath ) : string
repositoryPath string
return string

GetSetting() public method

public GetSetting ( string setting ) : string
setting string
return string

GetSettings() public method

public GetSettings ( string setting ) : IEnumerable
setting string
return IEnumerable

GetSingleDiff() public method

public GetSingleDiff ( string @from, string to, string fileName, string oldFileName, string extraDiffArguments, Encoding encoding, bool cacheResult ) : PatchApply.Patch
@from string
to string
fileName string
oldFileName string
extraDiffArguments string
encoding System.Text.Encoding
cacheResult bool
return PatchApply.Patch

GetSortedRefs() public method

public GetSortedRefs ( ) : IList
return IList

GetStagedFiles() public method

public GetStagedFiles ( ) : IList
return IList

GetStagedFilesWithSubmodulesStatus() public method

public GetStagedFilesWithSubmodulesStatus ( ) : IList
return IList

GetStashDiffFiles() public method

public GetStashDiffFiles ( string stashName ) : IList
stashName string
return IList

GetStashes() public method

public GetStashes ( ) : IList
return IList

GetStatusText() public method

public GetStatusText ( bool untracked ) : string
untracked bool
return string

GetSubmodule() public method

public GetSubmodule ( string localPath ) : GitModule
localPath string
return GitModule

GetSubmoduleConfigFile() public method

public GetSubmoduleConfigFile ( ) : ConfigFile
return ConfigFile

GetSubmoduleFullPath() public method

public GetSubmoduleFullPath ( string localPath ) : string
localPath string
return string

GetSubmoduleItemsForEachRef() public method

public GetSubmoduleItemsForEachRef ( string filename, bool>.Func showRemoteRef ) : IGitItem>.Dictionary
filename string
showRemoteRef bool>.Func
return IGitItem>.Dictionary

GetSubmoduleNameByPath() public method

public GetSubmoduleNameByPath ( string localPath ) : string
localPath string
return string

GetSubmoduleRemotePath() public method

public GetSubmoduleRemotePath ( string name ) : string
name string
return string

GetSubmoduleSummary() public method

public GetSubmoduleSummary ( string submodule ) : string
submodule string
return string

GetSubmodulesInfo() public method

public GetSubmodulesInfo ( ) : IEnumerable
return IEnumerable

GetSubmodulesLocalPaths() public method

This is a faster function to get the names of all submodules then the GetSubmodules() function. The command @git submodule is very slow.
public GetSubmodulesLocalPaths ( bool recursive = true ) : IList
recursive bool
return IList

GetSuperprojectCurrentCheckout() public method

public GetSuperprojectCurrentCheckout ( ) : string>.KeyValuePair
return string>.KeyValuePair

GetTagMessage() public method

Returns tag's message. If the lightweight tag is passed, corresponding commit message is returned.
public GetTagMessage ( string tag ) : string
tag string
return string

GetTagRefs() public method

public GetTagRefs ( GetTagRefsSortOrder option ) : IList
option GetTagRefsSortOrder Ordery by date is slower.
return IList

GetTree() public method

public GetTree ( string id, bool full ) : IList
id string
full bool
return IList

GetTreeFiles() public method

public GetTreeFiles ( string treeGuid, bool full ) : IList
treeGuid string
full bool
return IList

GetTreeRefs() public method

public GetTreeRefs ( string tree ) : IList
tree string
return IList

GetUnstagedFiles() public method

public GetUnstagedFiles ( ) : IList
return IList

GetUnstagedFilesWithSubmodulesStatus() public method

public GetUnstagedFilesWithSubmodulesStatus ( ) : IList
return IList

GitModule() public method

public GitModule ( string workingdir ) : System
workingdir string
return System

GitStatus() public method

public GitStatus ( UntrackedFilesMode untrackedFilesMode, IgnoreSubmodulesMode ignoreSubmodulesMode ) : IList
untrackedFilesMode UntrackedFilesMode
ignoreSubmodulesMode IgnoreSubmodulesMode
return IList

HandleConflictSelectSide() public method

public HandleConflictSelectSide ( string fileName, string side ) : bool
fileName string
side string
return bool

HandleConflictsSaveSide() public method

public HandleConflictsSaveSide ( string fileName, string saveAsFileName, string side ) : bool
fileName string
saveAsFileName string
side string
return bool

HasSubmodules() public method

public HasSubmodules ( ) : bool
return bool

InTheMiddleOfAction() public method

public InTheMiddleOfAction ( ) : bool
return bool

InTheMiddleOfBisect() public method

public InTheMiddleOfBisect ( ) : bool
return bool

InTheMiddleOfConflictedMerge() public method

public InTheMiddleOfConflictedMerge ( ) : bool
return bool

InTheMiddleOfInteractiveRebase() public method

public InTheMiddleOfInteractiveRebase ( ) : bool
return bool

InTheMiddleOfPatch() public method

public InTheMiddleOfPatch ( ) : bool
return bool

InTheMiddleOfRebase() public method

public InTheMiddleOfRebase ( ) : bool
return bool

Init() public method

public Init ( bool bare, bool shared ) : string
bare bool
shared bool
return string

IsBareRepository() public method

public IsBareRepository ( ) : bool
return bool

IsBareRepository() public static method

public static IsBareRepository ( string repositoryPath ) : bool
repositoryPath string
return bool

IsDetachedHead() public method

Indicates whether HEAD is not pointing to a branch.
public IsDetachedHead ( ) : bool
return bool

IsDetachedHead() public static method

public static IsDetachedHead ( string branch ) : bool
branch string
return bool

IsDirtyDir() public method

Indicates whether there are any changes to the repository, including any untracked files or directories; excluding submodules.
public IsDirtyDir ( ) : bool
return bool

IsLockedIndex() public method

public IsLockedIndex ( ) : bool
return bool

IsLockedIndex() public static method

public static IsLockedIndex ( string repositoryPath ) : bool
repositoryPath string
return bool

IsMerge() public method

public IsMerge ( string commit ) : bool
commit string
return bool

IsRunningGitProcess() public method

public IsRunningGitProcess ( ) : bool
return bool

IsSubmodule() public method

public IsSubmodule ( string submodulePath ) : bool
submodulePath string
return bool

IsValidGitWorkingDir() public method

Indicates whether the WorkingDir contains a git repository.
public IsValidGitWorkingDir ( ) : bool
return bool

IsValidGitWorkingDir() public static method

Indicates whether the specified directory contains a git repository.
public static IsValidGitWorkingDir ( string dir ) : bool
dir string
return bool

LastPullActionToFormPullAction() public method

public LastPullActionToFormPullAction ( ) : void
return void

OpenWithDifftool() public method

public OpenWithDifftool ( string filename, string oldFileName = "", string revision1 = null, string revision2 = null, string extraDiffArguments = "" ) : string
filename string
oldFileName string
revision1 string
revision2 string
extraDiffArguments string
return string

PathIsUrl() public static method

public static PathIsUrl ( string path ) : bool
path string
return bool

PullCmd() public method

public PullCmd ( string remote, string remoteBranch, string localBranch, bool rebase, bool fetchTags = false, bool isUnshallow = false ) : string
remote string
remoteBranch string
localBranch string
rebase bool
fetchTags bool
isUnshallow bool
return string

PushAllCmd() public method

Creates a 'git push' command using the specified parameters.
public PushAllCmd ( string remote, ForcePushOptions force, bool track, int recursiveSubmodules ) : string
remote string Remote repository that is the destination of the push operation.
force ForcePushOptions If a remote ref is not an ancestor of the local ref, overwrite it. /// This can cause the remote repository to lose commits; use it with care.
track bool For every branch that is up to date or successfully pushed, add upstream (tracking) reference.
recursiveSubmodules int If '1', check whether all submodule commits used by the revisions to be pushed are available on a remote tracking branch; otherwise, the push will be aborted.
return string

PushCmd() public method

Creates a 'git push' command using the specified parameters.
public PushCmd ( string remote, string fromBranch, string toBranch, ForcePushOptions force, bool track, int recursiveSubmodules ) : string
remote string Remote repository that is the destination of the push operation.
fromBranch string Name of the branch to push.
toBranch string Name of the ref on the remote side to update with the push.
force ForcePushOptions If a remote ref is not an ancestor of the local ref, overwrite it. /// This can cause the remote repository to lose commits; use it with care.
track bool For every branch that is up to date or successfully pushed, add upstream (tracking) reference.
recursiveSubmodules int If '1', check whether all submodule commits used by the revisions to be pushed are available on a remote tracking branch; otherwise, the push will be aborted.
return string

ReEncodeCommitMessage() public method

public ReEncodeCommitMessage ( string s, string toEncodingName ) : string
s string
toEncodingName string
return string

ReEncodeFileNameFromLossless() public static method

public static ReEncodeFileNameFromLossless ( string fileName ) : string
fileName string
return string

ReEncodeShowString() public method

header part of show result is encoded in logoutputencoding (including reencoded commit message) diff part is raw data in file's original encoding s should be encoded in LosslessEncoding
public ReEncodeShowString ( string s ) : string
s string
return string

ReEncodeString() public static method

public static ReEncodeString ( string s, Encoding fromEncoding, Encoding toEncoding ) : string
s string
fromEncoding Encoding
toEncoding Encoding
return string

ReEncodeStringFromLossless() public method

public ReEncodeStringFromLossless ( string s ) : string
s string
return string

ReEncodeStringFromLossless() public static method

reencodes string from GitCommandHelpers.LosslessEncoding to toEncoding
public static ReEncodeStringFromLossless ( string s, Encoding toEncoding ) : string
s string
toEncoding Encoding
return string

ReadGitOutputLines() public method

Run git command, console window is hidden, wait for exit, redirect output
public ReadGitOutputLines ( string arguments ) : IEnumerable
arguments string
return IEnumerable

RemoveFiles() public method

public RemoveFiles ( IEnumerable fileList, bool force ) : string
fileList IEnumerable
force bool
return string

RemoveRemote() public method

public RemoveRemote ( string name ) : string
name string
return string

RenameBranch() public method

public RenameBranch ( string name, string newName ) : string
name string
newName string
return string

RenameRemote() public method

public RenameRemote ( string name, string newName ) : string
name string
newName string
return string

ResetFile() public method

public ResetFile ( string file ) : string
file string
return string

ResetHard() public method

public ResetHard ( string commit ) : string
commit string
return string

ResetHard() public method

public ResetHard ( string commit, string file ) : string
commit string
file string
return string

ResetMixed() public method

public ResetMixed ( string commit ) : string
commit string
return string

ResetMixed() public method

public ResetMixed ( string commit, string file ) : string
commit string
file string
return string

ResetSoft() public method

public ResetSoft ( string commit ) : string
commit string
return string

ResetSoft() public method

public ResetSoft ( string commit, string file ) : string
commit string
file string
return string

RevParse() public method

public RevParse ( string revisionExpression ) : string
revisionExpression string
return string

RunBash() public method

Runs a bash or shell command.
public RunBash ( string bashCommand = null ) : Process
bashCommand string
return Process

RunBatchFile() public method

Run batch file, console window is hidden, wait for exit, redirect output
public RunBatchFile ( string batchFile ) : string
batchFile string
return string

RunExternalCmdDetached() public method

Run command, console window is hidden
public RunExternalCmdDetached ( string cmd, string arguments ) : Process
cmd string
arguments string
return Process

RunExternalCmdDetached() public static method

Run command, console window is hidden
public static RunExternalCmdDetached ( string fileName, string arguments, string workingDir ) : Process
fileName string
arguments string
workingDir string
return Process

RunExternalCmdDetachedShowConsole() public method

Run command, console window is visible
public RunExternalCmdDetachedShowConsole ( string cmd, string arguments ) : Process
cmd string
arguments string
return Process

RunExternalCmdShowConsole() public method

Run command, console window is visible, wait for exit
public RunExternalCmdShowConsole ( string cmd, string arguments ) : void
cmd string
arguments string
return void

RunGitCmd() public method

Run git command, console window is hidden, wait for exit, redirect output
public RunGitCmd ( string arguments, Encoding encoding = null, byte stdInput = null ) : string
arguments string
encoding Encoding
stdInput byte
return string

RunGitCmdDetached() public method

Run git command, console window is hidden, redirect output
public RunGitCmdDetached ( string arguments, Encoding encoding = null ) : Process
arguments string
encoding Encoding
return Process

RunGitCmdResult() public method

Run git command, console window is hidden, wait for exit, redirect output
public RunGitCmdResult ( string arguments, Encoding encoding = null, byte stdInput = null ) : CmdResult
arguments string
encoding Encoding
stdInput byte
return CmdResult

RunGitK() public method

public RunGitK ( ) : void
return void

RunGui() public method

public RunGui ( ) : void
return void

SaveBlobAs() public method

public SaveBlobAs ( string saveAs, string blob ) : void
saveAs string
blob string
return void

SetPathSetting() public method

public SetPathSetting ( string setting, string value ) : void
setting string
value string
return void

SetSetting() public method

public SetSetting ( string setting, string value ) : void
setting string
value string
return void

ShowSha1() public method

public ShowSha1 ( string sha1 ) : string
sha1 string
return string

StageFile() public method

public StageFile ( string file ) : string
file string
return string

StageFileToRemove() public method

public StageFileToRemove ( string file ) : string
file string
return string

StageFiles() public method

public StageFiles ( IList files, bool &wereErrors ) : string
files IList
wereErrors bool
return string

StartPageantForRemote() public method

Tries to start Pageant for the specified remote repo (using the remote's PuTTY key file).
public StartPageantForRemote ( string remote ) : bool
remote string
return bool

StartPageantWithKey() public static method

public static StartPageantWithKey ( string sshKeyFile ) : void
sshKeyFile string
return void

StreamCopy() public static method

public static StreamCopy ( Stream input, Stream output ) : void
input Stream
output Stream
return void

Tag() public method

public Tag ( string tagName, string revision, bool annotation, bool force ) : string
tagName string
revision string
annotation bool
force bool
return string

ToString() public method

public ToString ( ) : string
return string

UnquoteFileName() public static method

public static UnquoteFileName ( string fileName ) : string
fileName string
return string

UnsetSetting() public method

public UnsetSetting ( string setting ) : void
setting string
return void

UnstageFile() public method

public UnstageFile ( string file ) : string
file string
return string

UnstageFileToRemove() public method

public UnstageFileToRemove ( string file ) : string
file string
return string

UnstageFiles() public method

public UnstageFiles ( IList files ) : string
files IList
return string

Property Details

DetachedBranch public_oe static_oe property

"(no branch)"
public static string DetachedBranch
return string

LosslessEncoding public_oe static_oe property

public static Encoding LosslessEncoding
return Encoding