Skip to content
Snippets Groups Projects
Commit 6db0536c authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Use commit deltas when counting files in IrkerWorker

parent 666a38a8
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -64,6 +64,7 @@ v 8.10.3
- Trim extra displayed carriage returns in diffs and files with CRLFs. !5588
- Speed up Commit#repo_changes
- Speed up and reduce memory usage of Commit#repo_changes and Repository#expire_avatar_cache
- Speed up and reduce memory usage of Commit#repo_changes, Repository#expire_avatar_cache and IrkerWorker
v 8.10.3 (unreleased)
- Fix hooks missing on imported GitLab projects
......
......@@ -141,8 +141,9 @@ def commit_from_id(project, id)
end
def files_count(commit)
files = "#{commit.diffs.real_size} file"
files += 's' if commit.diffs.count > 1
diffs = commit.diffs(deltas_only: true)
files = "#{diffs.real_size} file"
files += 's' if diffs.count > 1
files
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment