git

package
v2.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2016 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRemoteNotFound is returned when the remote cannot be found in git
	ErrRemoteNotFound = errors.New("Could not find remote matching app in 'git remote -v'")
	// ErrInvalidRepositoryList is an error returned if git returns unparsible output
	ErrInvalidRepositoryList = errors.New("Invalid output in 'git remote -v'")
)

Functions

func CreateRemote

func CreateRemote(cmd Cmd, host, name, appID string) error

CreateRemote adds a git remote in the current directory.

func DefaultCmd

func DefaultCmd(cmd []string) (string, error)

DefaultCmd is an implementation of Cmd that calls git.

func DeleteAppRemotes

func DeleteAppRemotes(cmd Cmd, host, appID string) error

DeleteAppRemotes removes all git remotes corresponding to an app in the repository.

func DeleteRemote

func DeleteRemote(cmd Cmd, name string) error

DeleteRemote removes a remote from the repository

func DetectAppName

func DetectAppName(cmd Cmd, host string) (string, error)

DetectAppName detects if there is deis remote in git.

func Init

func Init(cmd Cmd) error

Init creates a new git repository in the local directory.

func RemoteURL

func RemoteURL(cmd Cmd, name string) (string, error)

RemoteURL retrives the url that a git remote is set to.

func RepositoryURL

func RepositoryURL(host, appID string) string

RepositoryURL returns the git repository of an app.

Types

type Cmd

type Cmd func(cmd []string) (string, error)

Cmd is a method the exeutes the given git command and returns the output or the error.

Jump to

Keyboard shortcuts

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