MCPcopy Index your code
hub / github.com/desktop/desktop / isDiffTooLarge

Function isDiffTooLarge

app/src/lib/git/diff.ts:79–89  ·  view source on GitHub ↗

Is the diff too large for us to reasonably represent?

(diff: IRawDiff)

Source from the content-addressed store, hash-verified

77
78/** Is the diff too large for us to reasonably represent? */
79function isDiffTooLarge(diff: IRawDiff) {
80 for (const hunk of diff.hunks) {
81 for (const line of hunk.lines) {
82 if (line.text.length > MaxCharactersPerLine) {
83 return true
84 }
85 }
86 }
87
88 return false
89}
90
91/**
92 * Defining the list of known extensions we can render inside the app

Callers 2

getResolutionDiffFunction · 0.85
buildDiffFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected