Documentation ¶
Overview ¶
Package git provides types and utilities for dealing with Git repositories. It's very limited, and provide some access to git config file, being focused on tsuru needs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrRepositoryNotFound = errors.New("Repository not found.")
)
Functions ¶
func DiscoverRepositoryPath ¶
DiscoverRepositoryPath finds the path of the repository from a given directory. It returns the path to the repository, or an an empty string and a non-nil error if it can't find the repository.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository represents a git repository.
func OpenRepository ¶
func OpenRepository(p string) (*Repository, error)
OpenRepository opens a repository by its filepath. You can use DiscoverRepositoryPath to discover the repository from any directory, and use the result of this call as parameter for OpenRepository.
OpenRepository will return an error if the given path does not appear to be a git repository.