git

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package git provides functions for interacting with git repositories

Index

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

func AuthFailedErr(path ...string) error

AuthFailedErr attaches the daemon key in the error message

func InitializeRepository

func InitializeRepository(remoteURL string, opts RepoOptions, w io.Writer) (*gogit.Repository, error)

InitializeRepository sets up a project repository for the first time

func SimplifyGitErr

func SimplifyGitErr(err error) error

SimplifyGitErr checks errors that involve git remote operations and simplifies them to ErrInvalidGitAuthentication if possible

func UpdateRepository

func UpdateRepository(repo *gogit.Repository, opts RepoOptions, out io.Writer) error

UpdateRepository pulls and checkouts given branch from repository

Types

type RepoOptions added in v0.5.0

type RepoOptions struct {
	Directory string
	Branch    string
	Auth      transport.AuthMethod
}

RepoOptions declares options for a project repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL