Documentation ¶
Overview ¶
Package vcs provides helper functions for working with various repositories (e.g. git).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalizeCommit ¶
CanonicalizeCommit returns commit title that can be used when checking if a particular commit is present in a git tree. Some trees add prefixes to commit titles during backporting, so we want e.g. commit "foo bar" match "BACKPORT: foo bar".
func CheckBranch ¶
CheckBranch does a best-effort approximate check of a git branch name.
func CheckCommitHash ¶
func CheckRepoAddress ¶
CheckRepoAddress does a best-effort approximate check of a git repo address.
Types ¶
type BisectResult ¶
type BisectResult int
const ( BisectBad BisectResult = iota BisectGood BisectSkip )
type Repo ¶
type Repo interface { // Poll checkouts the specified repository/branch. // This involves fetching/resetting/cloning as necessary to recover from all possible problems. // Returns hash of the HEAD commit in the specified branch. Poll(repo, branch string) (*Commit, error) // CheckoutBranch checkouts the specified repository/branch. CheckoutBranch(repo, branch string) (*Commit, error) // CheckoutCommit checkouts the specified repository on the specified commit. CheckoutCommit(repo, commit string) (*Commit, error) // SwitchCommit checkouts the specified commit without fetching. SwitchCommit(commit string) (*Commit, error) // HeadCommit returns info about the HEAD commit of the current branch of git repository. HeadCommit() (*Commit, error) // ListRecentCommits returns list of recent commit titles starting from baseCommit. ListRecentCommits(baseCommit string) ([]string, error) // ExtractFixTagsFromCommits extracts fixing tags for bugs from git log. // Given email = "user@domain.com", it searches for tags of the form "user+tag@domain.com" // and return pairs {tag, commit title}. ExtractFixTagsFromCommits(baseCommit, email string) ([]FixCommit, error) // PreviousReleaseTags returns list of preceding release tags that are reachable from the given commit. PreviousReleaseTags(commit string) ([]string, error) // Bisect bisects good..bad commit range against the provided predicate (wrapper around git bisect). // The predicate should return an error only if there is no way to proceed // (it will abort the process), if possible it should prefer to return BisectSkip. // Progress of the process is streamed to the provided trace. // Returns the first commit on which the predicate returns BisectBad. Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) (*Commit, error) }
func NewSyzkallerRepo ¶
Click to show internal directories.
Click to hide internal directories.