Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FieldNames = map[string]string{
"%h": "abbreviated_commit",
"%p": "abbreviated_parent",
"%t": "abbreviated_tree",
"%aD": "author_date",
"%aE": "author_email",
"%aN": "author_name",
"%b": "body",
"%H": "commit",
"%N": "commit_notes",
"%cD": "committer_date",
"%cE": "committer_email",
"%cN": "committer_name",
"%e": "encoding",
"%P": "parent",
"%D": "refs",
"%f": "sanitized_subject_line",
"%GS": "signer",
"%GK": "signer_key",
"%s": "subject",
"%G?": "verification_flag",
}
FieldNames are for the formating and rendering of the CommitEntry structs. Keys here are from git log pretty format "format:..."
Functions ¶
func Check ¶
Check warns if changes introduce whitespace errors. Returns non-zero if any issues are found.
func FetchHeadCommit ¶
FetchHeadCommit returns the hash of FETCH_HEAD
Types ¶
type CommitEntry ¶
CommitEntry represents a single commit's information from `git`. See also FieldNames
func Commits ¶
func Commits(commitrange string) ([]CommitEntry, error)
Commits returns a set of commits. If commitrange is a git still range 12345...54321, then it will be isolated set of commits. If commitrange is a single commit, all ancestor commits up through the hash provided. If commitrange is an empty commit range, then nil is returned.
func LogCommit ¶
func LogCommit(commit string) (*CommitEntry, error)
LogCommit assembles the full information on a commit from its commit hash