Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedReadGitConfig = errors.New("Failed to read git config")
ErrFailedReadGitConfig signals failure to read .git/config
View Source
var ErrIsNotRepository = errors.New("This directory and all parents are not git repositories")
ErrIsNotRepository signals that no git repositories have been found
Functions ¶
This section is empty.
Types ¶
type GitRepository ¶
type GitRepository struct {
// contains filtered or unexported fields
}
GitRepository implements the git-go storage.ConfigStorer interface
func FindGitRepository ¶
func FindGitRepository(fromPath string, fs billy.Filesystem) (*GitRepository, error)
FindGitRepository finds the .git directory in the given directory, or any parents.
func ReadRepository ¶
func ReadRepository(path string, fs billy.Filesystem) (*GitRepository, error)
ReadRepository creates a GitRepository given a fs, and the relative path to the repo in that fs.
func (*GitRepository) Config ¶
func (repo *GitRepository) Config() (*config.Config, error)
Config reads a Config object from a GitRepository
func (*GitRepository) Root ¶
func (repo *GitRepository) Root() string
Root prints the root directory of the GitRepository
Click to show internal directories.
Click to hide internal directories.