Skip to content

Fix MR changes tab size count

Sean McGivern requested to merge fix-mr-size-with-over-100-files into master

What does this MR do?

When the number of files changed in an MR was greater than 100, the changes tab counter always showed '100' - until this change!

Are there points in the code the reviewer needs to double check?

Don't think so.

Why was this MR needed?

I introduced this bug when fixing a performance issue in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8310. This shouldn't be a performance concern, as the problem was that by going through Gitlab::Diff::FileCollection::MergeRequestDiff, we were highlighting the diffs just to count them, which we don't need when we're not actually rendering the diffs anywhere.

Screenshots (if relevant)

image

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/27563.

Merge request reports