Skip to content

Use files count from commit stats rpc for commit rapid diffs

What does this MR do and why?

This change uses the CommitStats RPC to count the number of changed files on the rapid diffs commit page.

Previously, we had to load all the diffs to display the file count in the "Changes" tab. This will make the rapid diffs load faster, especially for commits that change many files.

References

Closes Add diff count to CommitStats RPC (#500791)

Screenshots or screen recordings

Screenshot_2025-10-20_at_15.54.50

How to set up and validate locally

  1. Enable the rapid_diffs_on_commit_show FF
  2. Navigate to a commit with some diffs, for instance http://gdk.test:3000/gitlab-org/gitlab-test/-/commit/281d3a76f31c812dbf48abce82ccf6860adedd81?rapid_diffs=true
  3. See that the number in the changes tab is correct.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Gavin Hinfey

Merge request reports

Loading