Lines Matching refs:err
40 origin, err := runSandboxed(dir, "git", "remote", "get-url", "origin")
41 if err != nil || strings.TrimSpace(string(origin)) != repo {
43 if err := git.clone(repo, branch); err != nil {
44 return nil, err
50 if _, err := runSandboxed(dir, "git", "checkout", "origin/"+branch); err != nil {
52 if err := git.clone(repo, branch); err != nil {
53 return nil, err
56 if _, err := runSandboxed(dir, "git", "fetch", "--no-tags"); err != nil {
58 if err := git.clone(repo, branch); err != nil {
59 return nil, err
62 if _, err := runSandboxed(dir, "git", "checkout", "origin/"+branch); err != nil {
63 return nil, err
71 if _, err := runSandboxed(dir, "git", "reset", "--hard"); err != nil {
72 if err := git.initRepo(); err != nil {
73 return nil, err
76 _, err := runSandboxed(dir, "git", "fetch", repo, branch)
77 if err != nil {
78 return nil, err
80 if _, err := runSandboxed(dir, "git", "checkout", "FETCH_HEAD"); err != nil {
81 return nil, err
89 if _, err := runSandboxed(dir, "git", "reset", "--hard"); err != nil {
90 if err := git.initRepo(); err != nil {
91 return nil, err
94 _, err := runSandboxed(dir, "git", "fetch", repo)
95 if err != nil {
96 return nil, err
103 if _, err := runSandboxed(dir, "git", "checkout", commit); err != nil {
104 return nil, err
110 if err := git.initRepo(); err != nil {
111 return err
113 if _, err := runSandboxed(git.dir, "git", "remote", "add", "origin", repo); err != nil {
114 return err
116 if _, err := runSandboxed(git.dir, "git", "fetch", "origin", branch); err != nil {
117 return err
123 if err := os.RemoveAll(git.dir); err != nil {
124 return fmt.Errorf("failed to remove repo dir: %v", err)
126 if err := osutil.MkdirAll(git.dir); err != nil {
127 return fmt.Errorf("failed to create repo dir: %v", err)
129 if err := osutil.SandboxChown(git.dir); err != nil {
130 return err
132 if _, err := runSandboxed(git.dir, "git", "init"); err != nil {
133 return err
143 …output, err := runSandboxed(git.dir, "git", "log", "--format=%H%n%s%n%ae%n%ad%n%b", "-n", "1", com…
144 if err != nil {
145 return nil, err
156 date, err := time.Parse(dateFormat, string(lines[3]))
157 if err != nil {
158 return nil, fmt.Errorf("failed to parse date in git log output: %v\n%q", err, output)
168 addr, err := mail.ParseAddress(string(line[matches[2]:matches[3]]))
169 if err != nil {
195 output, err := runSandboxed(git.dir, "git", "log",
197 if err != nil {
198 return nil, err
207 stdout, err := cmd.StdoutPipe()
208 if err != nil {
209 return nil, err
211 if err := cmd.Start(); err != nil {
212 return nil, err
220 user, domain, err := splitEmail(email)
221 if err != nil {
222 return nil, fmt.Errorf("failed to parse email %q: %v", email, err)
266 func splitEmail(email string) (user, domain string, err error) {
267 addr, err := mail.ParseAddress(email)
268 if err != nil {
269 return "", "", err
287 firstBad, err := git.getCommit(bad)
288 if err != nil {
289 return nil, err
291 output, err := runSandboxed(dir, "git", "bisect", "start", bad, good)
292 if err != nil {
293 return nil, err
297 current, err := git.HeadCommit()
298 if err != nil {
299 return nil, err
307 res, err := pred()
308 if err != nil {
309 return nil, err
314 output, err = runSandboxed(dir, "git", "bisect", bisectTerms[res])
315 if err != nil {
316 return nil, err
319 next, err := git.HeadCommit()
320 if err != nil {
321 return nil, err
332 …output, err := runSandboxed(git.dir, "git", "tag", "--no-contains", commit, "--merged", commit, "v…
333 if err != nil {
334 return nil, err
354 v1, err := strconv.ParseUint(tag[matches[2]:matches[3]], 10, 64)
355 if err != nil {
358 v2, err := strconv.ParseUint(tag[matches[4]:matches[5]], 10, 64)
359 if err != nil {
364 v3, err = strconv.ParseUint(tag[matches[6]:matches[7]], 10, 64)
365 if err != nil {