Skip to content
Snippets Groups Projects

codeintel: Refrain from using git log --all in directed path

Merged Warren Gifford requested to merge ef/git-log-all into main

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

Merged by avatar (Jun 23, 2025 3:58pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #16733 (abbfc70) into main (9fa3300) will decrease coverage by 0.00%. The diff coverage is 40.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%) :arrow_down:
    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%) :arrow_down:
    ...nd/internal/codeintel/background/commit_updater.go 52.50% <100.00%> (+1.21%) :arrow_up:
Please register or sign in to reply
Loading