Documentation ¶
Overview ¶
Package git contains various commands that shell out to git
Package git contains various commands that shell out to git
Index ¶
- Constants
- Variables
- func CurrentBranch() (string, error)
- func CurrentRemote() (string, error)
- func FormatGitDate(tm time.Time) string
- func LsRemote(remote, remoteRef string) (string, error)
- func ParseGitDate(str string) (time.Time, error)
- func UpdateIndex(file string) error
- type CommitSummary
- type Ref
- type RefType
Constants ¶
Variables ¶
var Config = &gitConfig{}
Functions ¶
func CurrentBranch ¶
func CurrentRemote ¶
func FormatGitDate ¶ added in v0.6.0
FormatGitDate converts a Go date into a git command line format date
func ParseGitDate ¶ added in v0.6.0
Parse a Git date formatted in ISO 8601 format (%ci/%ai)
func UpdateIndex ¶ added in v0.5.2
Types ¶
type CommitSummary ¶ added in v0.6.0
type CommitSummary struct { Sha string ShortSha string Parents []string CommitDate time.Time AuthorDate time.Time AuthorName string AuthorEmail string CommitterName string CommitterEmail string Subject string }
Some top level information about a commit (only first line of message)
func GetCommitSummary ¶ added in v0.6.0
func GetCommitSummary(commit string) (*CommitSummary, error)
Get summary information about a commit
type Ref ¶ added in v0.6.0
A git reference (branch, tag etc)
func CurrentRef ¶
func CurrentRemoteRef ¶
func RecentBranches ¶ added in v0.6.0
RecentBranches returns branches with commit dates on or after the given date/time Return full Ref type for easier detection of duplicate SHAs etc since: refs with commits on or after this date will be included includeRemoteBranches: true to include refs on remote branches onlyRemote: set to non-blank to only include remote branches on a single remote