MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / runLength

Function runLength

src/utils/git-diff-stats.ts:230–242  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

228 let steps = 0;
229 // Matching lines in a row from (x, y), capped at MIN_RESYNC_RUN.
230 const runLength = (x: number, y: number) => {
231 let run = 0;
232 while (
233 run < MIN_RESYNC_RUN &&
234 x + run < aHi &&
235 y + run < bHi &&
236 a[x + run] === b[y + run]
237 ) {
238 run += 1;
239 }
240 steps += run + 1;
241 return run;
242 };
243
244 let matched = 0;
245 let x = aStart;

Callers 1

matchNearbyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected