MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / countHunks

Function countHunks

projects/electron/src/modules/code/git.ts:899–907  ·  view source on GitHub ↗
(patch: string)

Source from the content-addressed store, hash-verified

897}
898
899function countHunks(patch: string): number {
900 let count = 0
901 for (const line of patch.split("\n")) {
902 if (line.startsWith("@@")) {
903 count++
904 }
905 }
906 return count
907}
908
909// Common binary file extensions for fallback detection (when git can't determine)
910const BINARY_EXTENSIONS = new Set([

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected