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.