Fix bug where not all commits are added to the map

18d3c923ce96707619a9529f217c4d307f01b19d

Tucker McKnight <tmcknight@instructure.com> | Sun Aug 09 2026

Fix bug where not all commits are added to the map

I swear I fixed this before... Anyway, we don't want to return here.
There may be an already-found commit in the chain, but there are other,
un-added commits below it, which are from yet-undiscovered branches.
src/paginatedPatches.ts:16
Before
15
16
17

18
19
  const flatPatches = await flatPatchesFunc(repos)

  paginatedPatches = []
⁣
  const patchesPerPage = 30

  flatPatches.forEach((patch) => {
After
15
16
17
18
19
20
  const flatPatches = await flatPatchesFunc(repos)

  paginatedPatches = []
  // TODO: allow customizing the number of commits per page
  const patchesPerPage = 30

  flatPatches.forEach((patch) => {
src/vcses/git/operations.ts:61
Before
60
61
62
63
64
65

    // exit early if the commits map already includes this hash
    if (commits.has(hash)) {
      return
    }

    const nextBlankLine = currentPatch.findIndex(line => line === "") || currentPatch.length
After
60
61
62
63
64
65

    // exit early if the commits map already includes this hash
    if (commits.has(hash)) {
      continue
    }

    const nextBlankLine = currentPatch.findIndex(line => line === "") || currentPatch.length