Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmd/src/actions_exec_backend_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ func runAction(ctx context.Context, prefix, repoID, repoName, rev string, steps
return nil, errors.Wrap(err, "git add failed")
}

diffOut, err := runGitCmd("diff", "--cached")
// As of Sourcegraph 3.14 we only support unified diff format.
// That means we need to strip away the `a/` and `/b` prefixes with `--no-prefix`.
// See: https://github.com/sourcegraph/sourcegraph/blob/82d5e7e1562fef6be5c0b17f18631040fd330835/enterprise/internal/campaigns/service.go#L324-L329
//
diffOut, err := runGitCmd("diff", "--cached", "--no-prefix")
if err != nil {
return nil, errors.Wrap(err, "git diff failed")
}
Expand Down