---- Internal helpers ----
(ctx context.Context, from, to string)
| 311 | // ---- Internal helpers ---- |
| 312 | |
| 313 | func (p *Provider) computeMergeBase(ctx context.Context, from, to string) string { |
| 314 | out, err := p.runGit(ctx, "merge-base", "--end-of-options", from, to) |
| 315 | if err != nil { |
| 316 | return "" |
| 317 | } |
| 318 | return strings.TrimSpace(out) |
| 319 | } |
| 320 | |
| 321 | func (p *Provider) workspaceTrackedDiff(ctx context.Context) (string, error) { |
| 322 | out, err := p.runGit(ctx, "-c", "core.quotepath=false", "diff", "--no-ext-diff", "--no-textconv", "--find-renames", "--src-prefix=a/", "--dst-prefix=b/", "--no-color", "-U"+fmt.Sprint(DiffContextLines), "--end-of-options", "HEAD", "--") |