Documentation
¶
Overview ¶
Package git reads local checkouts with the git binary, as the planner asks.
Index ¶
- type Exec
- func (g Exec) CheckedOutAt(ctx context.Context, dir, branch string) (string, error)
- func (g Exec) HasCommit(ctx context.Context, dir, oid string) (bool, error)
- func (g Exec) IsAncestor(ctx context.Context, dir, ancestor, commit string) (bool, error)
- func (g Exec) LocalBranchTip(ctx context.Context, dir, branch string) (string, error)
- func (g Exec) Upstream(ctx context.Context, dir string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exec ¶
type Exec struct{}
Exec runs git on the PATH.
func (Exec) CheckedOutAt ¶
CheckedOutAt is the worktree that has branch checked out; "" for none.
func (Exec) IsAncestor ¶
IsAncestor says whether ancestor is reachable from commit; an unknown object is not an ancestor.
func (Exec) LocalBranchTip ¶
LocalBranchTip is the commit branch points at in dir; "" when there is no such branch.