Documentation
¶
Overview ¶
Package git resolves the base revision of a queue by asking a git workspace for the tip of the queue's target branch. Any gitworkspace.Factory works, so where git runs is the deployment's choice.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(factory gitworkspace.Factory, targets map[string]Target) baserevision.Resolver
New returns a Resolver that fetches the target branch of the queue and returns its tip as a full commit SHA. A queue without a target, or any git failure, is an error. Calls that share a Repo are serialized, because concurrent fetches into one clone can fail on a ref lock and overwrite each other's FETCH_HEAD.
Types ¶
type Target ¶
type Target struct {
// Repo identifies the repository to the workspace factory.
Repo string
// Remote is the git remote the branch is fetched from. It defaults to
// origin.
Remote string
// Branch is the target branch.
Branch string
}
Target locates the branch whose tip is a queue's base revision.