Lines Matching refs:git
22 type git struct { struct
28 func newGit(os, vm, dir string) *git {
29 return &git{
36 func (git *git) Poll(repo, branch string) (*Commit, error) { argument
37 dir := git.dir
43 if err := git.clone(repo, branch); err != nil {
52 if err := git.clone(repo, branch); err != nil {
58 if err := git.clone(repo, branch); err != nil {
65 return git.HeadCommit()
68 func (git *git) CheckoutBranch(repo, branch string) (*Commit, error) { argument
69 dir := git.dir
72 if err := git.initRepo(); err != nil {
83 return git.HeadCommit()
86 func (git *git) CheckoutCommit(repo, commit string) (*Commit, error) { argument
87 dir := git.dir
90 if err := git.initRepo(); err != nil {
98 return git.SwitchCommit(commit)
101 func (git *git) SwitchCommit(commit string) (*Commit, error) { argument
102 dir := git.dir
106 return git.HeadCommit()
109 func (git *git) clone(repo, branch string) error { argument
110 if err := git.initRepo(); err != nil {
113 if _, err := runSandboxed(git.dir, "git", "remote", "add", "origin", repo); err != nil {
116 if _, err := runSandboxed(git.dir, "git", "fetch", "origin", branch); err != nil {
122 func (git *git) initRepo() error { argument
123 if err := os.RemoveAll(git.dir); err != nil {
126 if err := osutil.MkdirAll(git.dir); err != nil {
129 if err := osutil.SandboxChown(git.dir); err != nil {
132 if _, err := runSandboxed(git.dir, "git", "init"); err != nil {
138 func (git *git) HeadCommit() (*Commit, error) { argument
139 return git.getCommit("HEAD")
142 func (git *git) getCommit(commit string) (*Commit, error) { argument
143 …output, err := runSandboxed(git.dir, "git", "log", "--format=%H%n%s%n%ae%n%ad%n%b", "-n", "1", com…
191 func (git *git) ListRecentCommits(baseCommit string) ([]string, error) { argument
195 output, err := runSandboxed(git.dir, "git", "log",
203 func (git *git) ExtractFixTagsFromCommits(baseCommit, email string) ([]FixCommit, error) { argument
206 cmd.Dir = git.dir
283 func (git *git) Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) (*Comm… argument
284 dir := git.dir
287 firstBad, err := git.getCommit(bad)
297 current, err := git.HeadCommit()
319 next, err := git.HeadCommit()
331 func (git *git) PreviousReleaseTags(commit string) ([]string, error) { argument
332 …output, err := runSandboxed(git.dir, "git", "tag", "--no-contains", commit, "--merged", commit, "v…