MCPcopy Create free account
hub / github.com/ds300/patch-package / commitHunk

Function commitHunk

src/patch/parse.ts:161–171  ·  view source on GitHub ↗
(i: number)

Source from the content-addressed store, hash-verified

159 let hunkStartLineIndex = 0
160
161 function commitHunk(i: number) {
162 if (currentHunk) {
163 if (currentHunkMutationPart) {
164 currentHunk.parts.push(currentHunkMutationPart)
165 currentHunkMutationPart = null
166 }
167 currentHunk.source = lines.slice(hunkStartLineIndex, i).join("\n")
168 currentFilePatch.hunks!.push(currentHunk)
169 currentHunk = null
170 }
171 }
172
173 function commitFilePatch(i: number) {
174 commitHunk(i)

Callers 2

commitFilePatchFunction · 0.85
parsePatchLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…