Documentation
¶
Index ¶
- func Clean(output string, err error) (string, error)
- func Commit(author, email, commit string) error
- func EmptyCommit(t *testing.T, commit string)
- func EmptyCommitAndTag(t *testing.T, tag, msg string)
- func EmptyCommits(t *testing.T, commits ...string)
- func EmptyCommitsAndTag(t *testing.T, tag string, msgs ...string)
- func InitRepo(t *testing.T)
- func IsRepo() bool
- func LatestTag() string
- func MkTmpDir(t *testing.T)
- func Push() error
- func Run(args ...string) (string, error)
- func Stage(path string) error
- func Tag(tag string) error
- type CommitMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Commit ¶
Commit will generate a commit against the repository and push it to the origin. The commit will be associated with the provided author and email address
func EmptyCommit ¶
EmptyCommit will create an empty commit without the need for modifying any existing files within the repository
func EmptyCommitAndTag ¶
EmptyCommitAndTag will create an empty commit with an associated tag. No existing files will be modified within the repository
func EmptyCommits ¶
EmptyCommits will create any number of empty commits without the need for modifying any existing files within the repository
func EmptyCommitsAndTag ¶
EmptyCommitsAndTag will create any number of empty commits and associate them with a tag. No existing files will be modified within the repository
func InitRepo ¶
InitRepo creates an empty git repository within a temporary directory. Once created the current testing context will operate from within that directory until the calling test has completed
func IsRepo ¶
func IsRepo() bool
IsRepo identifies whether the current working directory is a recognised git repository
func MkTmpDir ¶
MkTmpDir creates an empty directory that is not a git repository. Once created the current testing context will operate from within that directory until the calling test has completed
Types ¶
type CommitMetadata ¶ added in v0.2.0
CommitMetadata contains metadata about a specific git commit
func LatestCommit ¶
func LatestCommit() (CommitMetadata, error)
LatestCommit retrieves the latest commit within the repository