---- Internal helpers ----
(ctx context.Context, from, to string)
| 257 | // ---- Internal helpers ---- |
| 258 | |
| 259 | func (p *Provider) computeMergeBase(ctx context.Context, from, to string) string { |
| 260 | out, err := p.runGit(ctx, "merge-base", "--end-of-options", from, to) |
| 261 | if err != nil { |
| 262 | return "" |
| 263 | } |
| 264 | return strings.TrimSpace(out) |
| 265 | } |
| 266 | |
| 267 | func (p *Provider) workspaceTrackedDiff(ctx context.Context) (string, error) { |
| 268 | 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", "--") |