codeintel: Refrain from using git log --all in directed path
Created by: efritz
CommitGraph is used in two places:
- In the commit updater (offline, periodic process) that needs to get as much as the git graph as possible since a certain time, and
- In the code intel API when checking for the closest upload of an unknown commit (a commit that was pushed after the last index was uploaded)
In the former case, we want --all
to scoop as much of the non-main/master branch as possible so feature branches also get code intelligence.
In the latter case, --all
is actively harmful. It returns detached segments of the git graph that can't help us out, and blows a good proportion of our output limit. We have been seeing on dotcom newer commits with no code intelligence, which was traced to git log
output not listing the ancestor within 50 output lines.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #16733 (abbfc70) into main (9fa3300) will decrease coverage by
0.00%
. The diff coverage is40.00%
.@@ Coverage Diff @@ ## main #16733 +/- ## ========================================== - Coverage 52.42% 52.42% -0.01% ========================================== Files 1698 1698 Lines 84554 84557 +3 Branches 7684 7684 ========================================== + Hits 44326 44327 +1 - Misses 36353 36355 +2 Partials 3875 3875
Flag Coverage Δ *Carryforward flag go 51.67% <40.00%> (-0.01%)
integration 29.70% <ø> (ø)
Carriedforward from 9fa3300 storybook 28.57% <ø> (ø)
Carriedforward from 9fa3300 typescript 54.21% <ø> (ø)
Carriedforward from 9fa3300 unit 34.87% <ø> (ø)
Carriedforward from 9fa3300 *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ enterprise/internal/codeintel/gitserver/client.go 31.29% <0.00%> (-0.49%)
...nd/internal/codeintel/background/commit_updater.go 52.50% <100.00%> (+1.21%)
Please register or sign in to reply