MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / patchHasIntendedChanges

Function patchHasIntendedChanges

sdk/src/tools/apply-patch.ts:81–91  ·  view source on GitHub ↗
(diff: string)

Source from the content-addressed store, hash-verified

79}
80
81function patchHasIntendedChanges(diff: string): boolean {
82 return normalizeLineEndings(diff)
83 .split('\n')
84 .some((line) => {
85 if (line.startsWith('+++') || line.startsWith('---')) {
86 return false
87 }
88
89 return line.startsWith('+') || line.startsWith('-')
90 })
91}
92
93function normalizeDiffLines(diff: string): string[] {
94 return diff

Callers 1

Calls 1

normalizeLineEndingsFunction · 0.70

Tested by

no test coverage detected