search: use the searched repo in new commit search
Created by: keegancsmith
We close over repoRev in the onMatches closure below. However, repoRev is a loop variable, so is changed on each loop. This meant in practice we always reported the last repo in "j.Repos" as the matched repository. We pull repoRev into the loop body scope to copy it each iteration.
Test Plan: Locally ran "type:diff foobar". This had results in multiple repos.
- no feature flag :: correct
- feature flag :: incorrect - all results in same repo
- apply this commit :: correct
Fixes https://github.com/sourcegraph/sourcegraph/issues/26344