Function
generateUnifiedPatch
(
path: string,
oldContent: string,
newContent: string,
contextLines = 4,
)
Source from the content-addressed store, hash-verified
| 221 | // ---------- diffs ---------- |
| 222 | |
| 223 | export function generateUnifiedPatch( |
| 224 | path: string, |
| 225 | oldContent: string, |
| 226 | newContent: string, |
| 227 | contextLines = 4, |
| 228 | ): string { |
| 229 | return Diff.createTwoFilesPatch(path, path, oldContent, newContent, undefined, undefined, { |
| 230 | context: contextLines, |
| 231 | }); |
| 232 | } |
| 233 | |
| 234 | export interface EditDiffResult { |
| 235 | diff: string; |
Tested by
no test coverage detected