Gitaly: Add support for multiple commits (batch version) in diff RPC
Problem
When we sync a commit to Jira, we currently limit the diff files we sync to 10.
This is due to N+1 problems.
We currently use the diffs RPC to get those files, but we ran into an N+1 problem because it is not possible to batch load diffs for multiple commits. I tried it in this MR: gitlab!48706 (comment 459086632).
We only need the path
, change type
(added, deleted, moved, modified), number of added lines
and number of removed lines
(lib/atlassian/jira_connect/serializers/file_entity.rb#L9-33)
Possible solutions
We can either support multiple commits in diffs RPC or create a new RPC that just returns the file paths, change_type and lines changed numbers for multiple commits.
Edited by Luke Duncalfe