Documentation ¶
Overview ¶
Package git allows working with Git repositories
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBareRoot ¶
IsRoot returns true if location is the root of a bare git repository
func NameFromRepositoryURL ¶
NameFromRepositoryURL suggests a name for a repository URL based on the last segment of the path, or returns false
Types ¶
type ChangedRef ¶
func ParsePostReceive ¶
func ParsePostReceive(r io.Reader) ([]ChangedRef, error)
type CloneOptions ¶ added in v1.1.1
CloneOptions are options used in cloning a git repository
type Repository ¶
type Repository interface { GetRootDir(dir string) (string, error) GetOriginURL(dir string) (string, bool, error) GetRef(dir string) string Clone(dir string, url string) error CloneWithOptions(dir string, url string, opts CloneOptions) error CloneBare(dir string, url string) error CloneMirror(dir string, url string) error Fetch(dir string) error Checkout(dir string, ref string) error Archive(dir, ref, format string, w io.Writer) error Init(dir string, bare bool) error AddRemote(dir string, name, url string) error AddLocalConfig(dir, name, value string) error ShowFormat(dir, commit, format string) (string, error) ListRemote(url string, args ...string) (string, string, error) GetInfo(location string) (*SourceInfo, []error) }
Repository represents a git source repository
func NewRepositoryForBinary ¶
func NewRepositoryForBinary(gitBinaryPath string) Repository
NewRepositoryForBinary returns a Repository using the specified git executable.
func NewRepositoryForBinaryWithEnvironment ¶ added in v1.1.1
func NewRepositoryForBinaryWithEnvironment(gitBinaryPath string, env []string) Repository
NewRepositoryForBinary returns a Repository using the specified git executable and environment
func NewRepositoryWithEnv ¶ added in v1.1.1
func NewRepositoryWithEnv(env []string) Repository
NewRepositoryForEnv creates a new Repository using the specified environment
type SourceInfo ¶ added in v1.1.1
type SourceInfo struct {
s2iapi.SourceInfo
}
SourceInfo stores information about the source code
Click to show internal directories.
Click to hide internal directories.