Documentation ¶
Overview ¶
Package git provides functions for interacting with git repositories
Index ¶
- Variables
- func AuthFailedErr(path ...string) error
- func InitializeRepository(directory, remoteURL, branch string, authMethod transport.AuthMethod, ...) (*gogit.Repository, error)
- func SimplifyGitErr(err error) error
- func UpdateRepository(directory string, repo *gogit.Repository, branch string, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidGitAuthentication is returned when handshake with a git remote fails ErrInvalidGitAuthentication = errors.New("git authentication failed") )
Functions ¶
func AuthFailedErr ¶
AuthFailedErr attaches the daemon key in the error message
func InitializeRepository ¶
func InitializeRepository(directory, remoteURL, branch string, authMethod transport.AuthMethod, w io.Writer) (*gogit.Repository, error)
InitializeRepository sets up a project repository for the first time
func SimplifyGitErr ¶
SimplifyGitErr checks errors that involve git remote operations and simplifies them to ErrInvalidGitAuthentication if possible
func UpdateRepository ¶
func UpdateRepository(directory string, repo *gogit.Repository, branch string, auth transport.AuthMethod, out io.Writer) error
UpdateRepository pulls and checkouts given branch from repository
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.