Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRepositoryAlreadyExists = errors.New("repository already exists")
Functions ¶
This section is empty.
Types ¶
type CommitOpts ¶
type CommitOpts struct {
All bool
}
type Option ¶
type Option func(r *repo) error
func WithDetectRootDir ¶
func WithDetectRootDir() Option
func WithGitDir ¶
func WithRootDir ¶
type Repo ¶
type Repo interface { Init(wd string, opts ...Option) error Open(wd string, opts ...Option) error InitOrOpen(wd string, opts ...Option) error OpenFile(filePath string, flag int, perm os.FileMode) (billy.File, error) CreateFile(filePath string) (billy.File, error) CopyFile(fromPath, toPath string) error Exists(filePath string) bool CreateDir(filePath string) (billy.Dir, error) RemoveFileFromIgnore(filePath string) error AddFileToIgnore(filePath string) error AddFileToGit(filePath string) error Commit(msg string, opts CommitOpts) error Log() []Commit Workdir() string Gitdir() string Branch() (string, error) Hash() (string, error) }
Click to show internal directories.
Click to hide internal directories.