Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseGitError ¶
ParseGitError takes git output as an input and tries to find some meaningful errors can be used by the app
func RequiresCredentials ¶ added in v0.9.3
RequiresCredentials checks if the error indicates that authentication credentials are required
Types ¶
type GitError ¶
type GitError string
GitError is the errors from git package
const ( // ErrGitCommand is thrown when git command returned an error code ErrGitCommand GitError = "git command returned error code" // ErrAuthenticationRequired is thrown when an authentication required on // a remote operation ErrAuthenticationRequired GitError = "authentication required" // ErrAuthorizationFailed is thrown when authorization failed while trying // to authenticate with remote ErrAuthorizationFailed GitError = "authorization failed" // ErrAlreadyUpToDate is thrown when a repository is already up to date // with its src on merge/fetch/pull ErrAlreadyUpToDate GitError = "already up to date" // ErrCouldNotFindRemoteRef is thrown when trying to fetch/pull cannot // find suitable remote reference ErrCouldNotFindRemoteRef GitError = "could not find remote ref" // ErrMergeAbortedTryCommit indicates that the repositort is not clean and // some changes may conflict with the merge ErrMergeAbortedTryCommit GitError = "stash/commit changes. aborted" // ErrRemoteBranchNotSpecified means that default remote branch is not set // for the current branch. can be setted with "git config --local --add // branch.<your branch name>.remote=<your remote name> " ErrRemoteBranchNotSpecified GitError = ("upstream not set") // ErrRemoteNotFound is thrown when the remote is not reachable. It may be // caused by the deletion of the remote or connectivity problems ErrRemoteNotFound GitError = ("remote not found") // ErrConflictAfterMerge is thrown when a conflict occurs at merging two // references ErrConflictAfterMerge GitError = ("conflict while merging") // ErrUnmergedFiles possibly occurs after a conflict ErrUnmergedFiles GitError = ("unmerged files detected") // ErrReferenceBroken thrown when unable to resolve reference ErrReferenceBroken GitError = ("unable to resolve reference") // ErrPermissionDenied is thrown when ssh authentication occurs ErrPermissionDenied GitError = ("permission denied") // ErrOverwrittenByMerge is the thrown when there is un-tracked files on working tree ErrOverwrittenByMerge GitError = ("move or remove un-tracked files before merge") // ErrUserEmailNotSet is thrown if there is no configured user email while // commit command ErrUserEmailNotSet GitError = "user email not set" // ErrCredentialPromptDetected is thrown when a credential prompt is detected in the output ErrCredentialPromptDetected GitError = "credential prompt detected" // ErrNetworkTimeout is thrown when network operations timeout ErrNetworkTimeout GitError = ("network timeout") // ErrNetworkUnreachable is thrown when network is unreachable ErrNetworkUnreachable GitError = ("network unreachable") // ErrDNSError is thrown when DNS resolution fails ErrDNSError GitError = ("dns resolution failed") // ErrSSLError is thrown when SSL/TLS validation fails ErrSSLError GitError = ("ssl certificate problem") // ErrUnclassified is unconsidered error type ErrUnclassified GitError = ("unclassified error") )
Click to show internal directories.
Click to hide internal directories.