Documentation
¶
Overview ¶
Package gitx is the few git questions the gates and drivers ask, as one line of plumbing each. Anything that parses what git prints lives here, so two gates cannot read the same output two ways.
Index ¶
- Variables
- func ChangedFiles(root, from, to string) ([]string, error)
- func Files(root string) ([]string, error)
- func LatestTag(root string) (string, error)
- func MergeBase(root, base, head string) (string, error)
- func Messages(root, from, to string) ([]string, error)
- func Output(dir string, args ...string) (string, error)
- func Resolve(root, rev string) (string, error)
- func Root(dir string) (string, error)
- func Show(root, rev, path string) ([]byte, error)
- func Tracked(root string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNoTag = errors.New("no tag reachable from HEAD")
ErrNoTag is LatestTag finding no tag reachable from HEAD.
Functions ¶
func ChangedFiles ¶
ChangedFiles lists the paths that differ between two revisions, sorted.
func Files ¶
Files lists what git would put in a commit from root: tracked files and untracked files that are not ignored, relative to root, slash-separated and sorted. A tracked file deleted from the work tree is left out, since there is nothing to read.
func MergeBase ¶
MergeBase is the commit a pull request is measured from: the best common ancestor of base and head. The base SHA a pull request event records is stale in a stacked pull request; this is not.
func Output ¶
Output runs git in dir and returns what it wrote to stdout. A failure carries git's own stderr, trimmed.
Types ¶
This section is empty.